daffodil.pixel

This module contains the implementation for the internal pixel storage mechanisms.

Members

Functions

toColorValue
V toColorValue(const real value)

Converts a real to a specified color value.

toColorValues
V[] toColorValues(const real[] values)

Converts an array of reals to an array of specified color values.

toReal
real toReal(const V value)

Converts a valid color value to a real.

toReals
real[] toReals(const V[] values)

Converts an array of valid color values to an array of reals.

Structs

Pixel
struct Pixel(V)

The storage struct for a color.

Templates

isColorValue
template isColorValue(V)

Template for checking whether a type is a valid color value. Color values are what daffodil stores internally.

isCustomColorValue
template isCustomColorValue(V)

Template for checking whether a type is a valid custom color value. A custom color value must have a static `init` property, a static `fromReal` that converts a real to `V`, and a `toReal` function that converts a `V` back to a real.

Meta