ae.utils.graphics.color

Color type and operations.

Members

Aliases

BGR
alias BGR = Color!(ubyte, "b", "g", "r")
Undocumented in source.
BGRA
alias BGRA = Color!(ubyte, "b", "g", "r", "a")
Undocumented in source.
BGRX
alias BGRX = Color!(ubyte, "b", "g", "r", "x")
Undocumented in source.
ExpandChannelType
alias ExpandChannelType(COLOR, int BYTES) = ChangeChannelType!(COLOR, UnsignedBitsType!((ChannelType!COLOR.sizeof + BYTES) * 8))
Undocumented in source.
L16
alias L16 = Color!(ushort, "l")
Undocumented in source.
L8
alias L8 = Color!(ubyte, "l")
Undocumented in source.
LA
alias LA = Color!(ubyte, "l", "a")
Undocumented in source.
LA16
alias LA16 = Color!(ushort, "l", "a")
Undocumented in source.
RGB
alias RGB = Color!(ubyte, "r", "g", "b")
Undocumented in source.
RGB16
alias RGB16 = Color!(ushort, "r", "g", "b")
Undocumented in source.
RGBA
alias RGBA = Color!(ubyte, "r", "g", "b", "a")
Undocumented in source.
RGBA16
alias RGBA16 = Color!(ushort, "r", "g", "b", "a")
Undocumented in source.
RGBX
alias RGBX = Color!(ubyte, "r", "g", "b", "x")
Undocumented in source.
RGBX16
alias RGBX16 = Color!(ushort, "r", "g", "b", "x")
Undocumented in source.
S16
alias S16 = Color!(short, "l")
Undocumented in source.
S8
alias S8 = Color!(byte, "l")
Undocumented in source.

Functions

blend
T blend(T f, T b, T a)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Color
struct Color(FieldTuple...)

Instantiates to a color type. FieldTuple is the color specifier, as parsed by the FieldList template from ae.utils.meta. By convention, each field's name indicates its purpose: - x: padding - a: alpha - l: lightness (or grey, for monochrome images) - others (r, g, b, etc.): color information

Templates

ChangeChannelType
template ChangeChannelType(COLOR, T)

Resolves to a Color instance with a different ChannelType.

ChannelType
template ChannelType(T)

Obtains the type of each channel for homogenous colors.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>