PackedRGB

A packed RGB color, parameterised with format, unpacked component type, and color space specification.

Constructors

this
this(UnpackedColor color)

Construct a color from RGB and optional alpha values.

Members

Aliases

ParentColor
alias ParentColor = UnpackedColor
Undocumented in source.
UnpackedColor
alias UnpackedColor = RGB!(components, ComponentType_, false, colorSpace_)

The unpacked color type.

Functions

opCast
Color opCast()

Cast to other color types.

opEquals
bool opEquals(typeof(this) rh)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

BitsPerElement
enum BitsPerElement;

Number of bits per element.

format
enum format;

The packed color format.

Properties

unpacked
ParentColor unpacked [@property getter]

The unpacked color.

Static functions

convertColorImpl
To convertColorImpl(From color)
Undocumented in source. Be warned that the author may not have intended to support it.
convertColorImpl
To convertColorImpl(From color)
Undocumented in source. Be warned that the author may not have intended to support it.
convertColorImpl
To convertColorImpl(From color)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

colorSpace
enum RGBColorSpace colorSpace;

The colors color space.

colorSpaceDesc
enum RGBColorSpaceDesc!F colorSpaceDesc(F = double);

The color space descriptor.

componentInfo
enum ComponentInfo[components.length] componentInfo;

Bit assignments for each component.

components
enum string components;

The color components that were specified.

data
Buffer!(BitsPerElement / 8) data;

The raw packed data.

hasAlpha
enum bool hasAlpha;

If the color has alpha.

hasComponent
enum bool hasComponent(char c);

Test if a particular component is present.

hasSharedExponent
enum bool hasSharedExponent;

If the format has a shared exponent.

sharedExponent
enum ComponentInfo sharedExponent;

Shared exponent bits.

Parameters

ComponentType_

Type for the unpacked color channels. May be a basic integer or floating point type.

colorSpace_

Color will be within the specified color space.

Meta