XII Release 0.1.0
Loading...
Searching...
No Matches
xiiColorGammaUB Class Reference

A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represents colors in gamma space. More...

#include <Color8UNorm.h>

Inheritance diagram for xiiColorGammaUB:
[legend]

Public Member Functions

 XII_DECLARE_POD_TYPE ()
 
 xiiColorGammaUB ()=default
 Default-constructed color is uninitialized (for speed)
 
 xiiColorGammaUB (xiiUInt8 uiGammaRed, xiiUInt8 uiGammaGreen, xiiUInt8 uiGammaBlue, xiiUInt8 uiLinearAlpha=255)
 Copies the color values. RGB are assumed to be in Gamma space.
 
 xiiColorGammaUB (const xiiColor &color)
 Initializes the color with xiiColor. Converts the linear space color to gamma space. Assumes that the given color is normalized.
 
void operator= (const xiiColor &color)
 Initializes the color with xiiColor. Converts the linear space color to gamma space.
 
xiiColor ToLinearFloat () const
 Converts this color to xiiColor.
 
- Public Member Functions inherited from xiiColorBaseUB
 XII_DECLARE_POD_TYPE ()
 
 xiiColorBaseUB ()=default
 Default-constructed color is uninitialized (for speed)
 
 xiiColorBaseUB (xiiUInt8 r, xiiUInt8 g, xiiUInt8 b, xiiUInt8 a=255)
 Initializes the color with r, g, b, a.
 
const xiiUInt8 * GetData () const
 Conversion to const xiiUInt8*.
 
xiiUInt8 * GetData ()
 Conversion to xiiUInt8*.
 
xiiUInt32 ToRGBA8 () const
 Packs the 4 color values into a single uint32 with A in the least significant bits and R in the most significant ones.
 
xiiUInt32 ToABGR8 () const
 Packs the 4 color values into a single uint32 with R in the least significant bits and A in the most significant ones.
 

Static Public Member Functions

static xiiColorLinearUB MakeFromABGR8 (xiiUInt32 value)
 Extracts the values from a uint32 with R at the least significant bits, then G, then B and A at the most significant bits.
 

Additional Inherited Members

- Public Attributes inherited from xiiColorBaseUB
xiiUInt8 r
 
xiiUInt8 g
 
xiiUInt8 b
 
xiiUInt8 a
 

Detailed Description

A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represents colors in gamma space.

For any calculations or conversions use xiiColor.

See also
xiiColor

Constructor & Destructor Documentation

◆ xiiColorGammaUB()

xiiColorGammaUB::xiiColorGammaUB ( const xiiColor & color)
inline

Initializes the color with xiiColor. Converts the linear space color to gamma space. Assumes that the given color is normalized.

See also
xiiColor::IsNormalized

The documentation for this class was generated from the following files: