iaux::iaColor4< T > Struct Template Reference

#include <iaColor4.h>

Public Member Functions

 iaColor4 ()
 
 iaColor4 (T r, T g, T b, T a)
 
void set (T r, T g, T b, T a)
 
T * getData ()
 
iaColor4< T > operator= (const iaColor4< T > &color)
 
void operator+= (const iaColor4< T > &color)
 
void operator-= (const iaColor4< T > &color)
 
void operator*= (float32 factor)
 
void operator* (float32 factor)
 
 iaColor4 ()
 
 iaColor4 ()
 
const iaColor4< float32white (1.0, 1.0, 1.0, 1.0)
 
const iaColor4< uint8white (0xff, 0xff, 0xff, 0xff)
 
const iaColor4< float32lightGray (0.75, 0.75, 0.75, 1.0)
 
const iaColor4< uint8lightGray (0xbf, 0xbf, 0xbf, 0xff)
 
const iaColor4< float32gray (0.5, 0.5, 0.5, 1.0)
 
const iaColor4< uint8gray (0x80, 0x80, 0x80, 0xff)
 
const iaColor4< float32darkGray (0.25, 0.25, 0.25, 1.0)
 
const iaColor4< uint8darkGray (0x40, 0x40, 0x40, 0xff)
 
const iaColor4< float32black (0.0, 0.0, 0.0, 1.0)
 
const iaColor4< uint8black (0x00, 0x00, 0x00, 0xff)
 
const iaColor4< float32red (1.0, 0.0, 0.0, 1.0)
 
const iaColor4< uint8red (0xff, 0x00, 0x00, 0xff)
 
const iaColor4< float32green (0.0, 1.0, 0.0, 1.0)
 
const iaColor4< uint8green (0x00, 0xff, 0x00, 0xff)
 
const iaColor4< float32blue (0.0, 0.0, 1.0, 1.0)
 
const iaColor4< uint8blue (0x00, 0x00, 0xff, 0xff)
 
const iaColor4< float32yellow (1.0, 1.0, 0.0, 1.0)
 
const iaColor4< uint8yellow (0xff, 0xff, 0x00, 0xff)
 
const iaColor4< float32magenta (1.0, 0.0, 1.0, 1.0)
 
const iaColor4< uint8magenta (0xff, 0x00, 0xff, 0xff)
 
const iaColor4< float32cyan (0.0, 1.0, 1.0, 1.0)
 
const iaColor4< uint8cyan (0x00, 0xff, 0xff, 0xff)
 
const iaColor4< float32transparent (0.0, 0.0, 0.0, 0.0)
 
const iaColor4< uint8transparent (0x00, 0x00, 0x00, 0x00)
 

Public Attributes

_r
 
_g
 
_b
 
_a
 

Static Public Attributes

static IAUX_API_IMPORT_ONLY const iaColor4< T > white
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > lightGray
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > gray
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > darkGray
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > black
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > red
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > green
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > blue
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > yellow
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > cyan
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > magenta
 
static IAUX_API_IMPORT_ONLY const iaColor4< T > transparent
 

Detailed Description

template<typename T>
struct iaux::iaColor4< T >

color class the represents the red, green, blue and alpha channel

for floating point variant we expect values in range from 0.0 - 1.0 for integer variant we expect values in range from 0.0 - 255.0

Constructor & Destructor Documentation

◆ iaColor4() [1/4]

template<typename T >
iaux::iaColor4< T >::iaColor4 ( )

ctor initialize member variables

◆ iaColor4() [2/4]

template<typename T >
iaColor4::iaColor4 ( r,
g,
b,
a 
)

ctor initialize member variables with parameters

Parameters
rred component
ggreen component
bblue component
aalpha component

◆ iaColor4() [3/4]

iaux::iaColor4< float32 >::iaColor4 ( )

◆ iaColor4() [4/4]

iaColor4::iaColor4 ( )

Member Function Documentation

◆ black() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::black ( 0.  0,
0.  0,
0.  0,
1.  0 
)

◆ black() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::black ( 0x00  ,
0x00  ,
0x00  ,
0xff   
)

◆ blue() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::blue ( 0.  0,
0.  0,
1.  0,
1.  0 
)

◆ blue() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::blue ( 0x00  ,
0x00  ,
0xff  ,
0xff   
)

◆ cyan() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::cyan ( 0.  0,
1.  0,
1.  0,
1.  0 
)

◆ cyan() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::cyan ( 0x00  ,
0xff  ,
0xff  ,
0xff   
)

◆ darkGray() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::darkGray ( 0.  25,
0.  25,
0.  25,
1.  0 
)

◆ darkGray() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::darkGray ( 0x40  ,
0x40  ,
0x40  ,
0xff   
)

◆ getData()

template<typename T >
T * iaColor4::getData ( )
Returns
pointer to data

◆ gray() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::gray ( 0.  5,
0.  5,
0.  5,
1.  0 
)

◆ gray() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::gray ( 0x80  ,
0x80  ,
0x80  ,
0xff   
)

◆ green() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::green ( 0.  0,
1.  0,
0.  0,
1.  0 
)

◆ green() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::green ( 0x00  ,
0xff  ,
0x00  ,
0xff   
)

◆ lightGray() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::lightGray ( 0.  75,
0.  75,
0.  75,
1.  0 
)

◆ lightGray() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::lightGray ( 0xbf  ,
0xbf  ,
0xbf  ,
0xff   
)

◆ magenta() [1/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::magenta ( 0xff  ,
0x00  ,
0xff  ,
0xff   
)

◆ magenta() [2/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::magenta ( 1.  0,
0.  0,
1.  0,
1.  0 
)

◆ operator*()

template<typename T >
void iaColor4::operator* ( float32  factor)

scale operator

Parameters
factorthe value to scale with

◆ operator*=()

template<typename T >
void iaColor4::operator*= ( float32  factor)

scale operator

Parameters
factorthe value to scale with

◆ operator+=()

template<typename T >
void iaColor4::operator+= ( const iaColor4< T > &  color)

add operator

Parameters
colorthe color to add

◆ operator-=()

template<typename T >
void iaColor4::operator-= ( const iaColor4< T > &  color)

subtract operator

Parameters
colorthe color to subtract

◆ operator=()

template<typename T >
iaColor4< T > iaColor4::operator= ( const iaColor4< T > &  color)

assignment operator with other color

Parameters
colorthe color to assign

◆ red() [1/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::red ( 0xff  ,
0x00  ,
0x00  ,
0xff   
)

◆ red() [2/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::red ( 1.  0,
0.  0,
0.  0,
1.  0 
)

◆ set()

template<typename T >
void iaColor4::set ( r,
g,
b,
a 
)

set member variables with parameters

Parameters
rred component
ggreen component
bblue component
aalpha component

◆ transparent() [1/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::transparent ( 0.  0,
0.  0,
0.  0,
0.  0 
)

◆ transparent() [2/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::transparent ( 0x00  ,
0x00  ,
0x00  ,
0x00   
)

◆ white() [1/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::white ( 0xff  ,
0xff  ,
0xff  ,
0xff   
)

◆ white() [2/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::white ( 1.  0,
1.  0,
1.  0,
1.  0 
)

◆ yellow() [1/2]

const iaColor4< uint8 > iaux::iaColor4< uint8 >::yellow ( 0xff  ,
0xff  ,
0x00  ,
0xff   
)

◆ yellow() [2/2]

const iaColor4< float32 > iaux::iaColor4< float32 >::yellow ( 1.  0,
1.  0,
0.  0,
1.  0 
)

Member Data Documentation

◆ _a

template<typename T >
T iaux::iaColor4< T >::_a

alpha color channel

◆ _b

template<typename T >
T iaux::iaColor4< T >::_b

blue color channel

◆ _g

template<typename T >
T iaux::iaColor4< T >::_g

green color channel

◆ _r

template<typename T >
T iaux::iaColor4< T >::_r

red color channel

◆ black

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::black
static

◆ blue

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::blue
static

◆ cyan

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::cyan
static

◆ darkGray

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::darkGray
static

◆ gray

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::gray
static

◆ green

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::green
static

◆ lightGray

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::lightGray
static

◆ magenta

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::magenta
static

◆ red

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::red
static

◆ transparent

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::transparent
static

◆ white

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::white
static

◆ yellow

template<typename T >
IAUX_API_IMPORT_ONLY const iaColor4<T> iaux::iaColor4< T >::yellow
static

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