Skip to content

classColorBuf 03

Member Function Documentation

UBYTE ColorBuf::Alpha  )  const [inline]
 

Retrieve the alpha channel value. Return value is UBYTE so between 0 and 255.

Definition at line 72 of file ColorBuf.h.

References values.

UBYTE ColorBuf::Blue  )  const [inline]
 

Retrieve the blue channel value. Return value is UBYTE so between 0 and 255.

Definition at line 71 of file ColorBuf.h.

References values.

ULONG ColorBuf::Color  )  const [inline]
 

Retrieve all the color and alpha channel values as a ULONG, so between 0 and 255.

Definition at line 73 of file ColorBuf.h.

References color.

void ColorBuf::GammaCorrect float  power  )  [inline]
 

Apply a Gamma correction to the color channels. Alpha channel is not corrected.

Note:
Applying a Gamma correction directly on a ColorBuf instance is not recommanded because it can produce strong color aliasing where several original colors values will map to the same corrected value and several color values will be left unused resulting in loss of information. It is recommended that Gamma correction be applied from a RGBAFloat or RGBAHalf for optimal results.

Definition at line 152 of file ColorBuf.h.

References GammaCorrectColBuf(), and values.

Here is the call graph for this function:

RGBFloat ColorBuf::Get void   )  const [inline]
 

Retrieve the normalized (from 0.0 to 1.0) color channels values.

Definition at line 28 of file ColorBuf.inl.

References MAXCOLOR, and values.

RGBFloat ColorBuf::GetFactoredRGBFloat  )  const [inline]
 

Factored color values are between 0.0 and 255.0 where 0.0 represent total black and 255.0 represent a theoretical white.

Definition at line 34 of file ColorBuf.inl.

References values.

RGBFloat ColorBuf::GetNormalizedRGBFloat  )  const [inline]
 

Normalized color values are between 0.0 and 1.0 where 0.0 represent total black and 1.0 represent a theoretical white. Note that when stored in a ColorBuf, color values can never exceed 1.0.

Definition at line 39 of file ColorBuf.inl.

References MAXCOLOR, and values.

float ColorBuf::GetOpacity void   )  const [inline]
 

Retrieve the normalized (from 0.0 to 1.0) alpha channel value.

Definition at line 88 of file ColorBuf.h.

References MAXCOLOR, and values.

UBYTE ColorBuf::Green  )  const [inline]
 

Retrieve the green channel value. Return value is UBYTE so between 0 and 255.

Definition at line 70 of file ColorBuf.h.

References values.

void ColorBuf::operator *= const float  factor  )  [inline]
 

Multiplies the current instance channel values by the factor parameter. Result is rounded to the nearest integer.

Definition at line 137 of file ColorBuf.h.

References values.

ColorBuf::operator COLORREF  )  [inline]
 

Casts a ColorBuf into a COLORREF.

Definition at line 56 of file ColorBuf.h.

References values.