The OpenD Programming Language

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

UnpackedColor
alias UnpackedColor = RGB!(components, ComponentType_, false, colorSpace_)

The unpacked color type.

Functions

opCast
Color opCast()

Cast to other color types.

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.

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