Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Burger::RGBAWord8_t Struct Reference

Red, Green,Blue and Alpha 8 bit values. More...

Inheritance diagram for Burger::RGBAWord8_t:
Inheritance graph
[legend]
Collaboration diagram for Burger::RGBAWord8_t:
Collaboration graph
[legend]

Public Member Functions

uint32_t ToARGB (void) const
 Convert the color to an ARGB 32 bit integer.
 
uint32_t ToABGR (void) const
 Convert the color to a ABGR 32 bit integer.
 
void FromARGB (uint32_t uColor)
 Initialize the color with a 32 bit integer.
 
void FromABGR (uint32_t uColor)
 Initialize the color with a 32 bit integer.
 
void Interpolate (const RGBAWord8_t *pFrom, const RGBAWord8_t *pTo, float fFactor)
 Interpolates between two colors.
 

Public Attributes

uint8_t m_uRed
 8 bit red value
 
uint8_t m_uGreen
 8 bit green value
 
uint8_t m_uBlue
 8 bit blue value
 
uint8_t m_uAlpha
 8 bit alpha value
 

Static Public Attributes

static const RGBAWord8_t Aqua = {0,255,255,255}
 
static const RGBAWord8_t Black = {0,0,0,255}
 
static const RGBAWord8_t Blue = {0,0,255,255}
 
static const RGBAWord8_t Fuchsia = {255,0,255,255}
 
static const RGBAWord8_t Gray = {128,128,128,255}
 
static const RGBAWord8_t Green = {0,128,0,255}
 
static const RGBAWord8_t Lime = {0,255,0,255}
 
static const RGBAWord8_t Maroon = {128,0,0,255}
 
static const RGBAWord8_t Navy = {0,0,128,255}
 
static const RGBAWord8_t Olive = {128,128,0,255}
 
static const RGBAWord8_t Orange = {255,165,0,255}
 
static const RGBAWord8_t Purple = {128,0,128,255}
 
static const RGBAWord8_t Red = {255,0,0,255}
 
static const RGBAWord8_t Silver = {192,192,192,255}
 
static const RGBAWord8_t Teal = {0,128,128,255}
 
static const RGBAWord8_t White = {255,255,255,255}
 
static const RGBAWord8_t Yellow = {255,255,0,255}
 

Detailed Description

Red, Green,Blue and Alpha 8 bit values.


Four byte structure that contains the red, green, blue and alpha (in that order) color components where the value of 0 mean absence of color and 255 is the maximum color

See also
Burger::RGBWord8_t, Burger::RGBAWord16_t and Burger::RGBAFloat_t

Member Function Documentation

◆ FromABGR()

void Burger::RGBAWord8_t::FromABGR ( uint32_t uColor)
inline

Initialize the color with a 32 bit integer.


Convert the color from a 32 bit integer whereas A<<24+B<<16+G<<8+R and store the Alpha, Red, Green and Blue components

Parameters
uColor32 bit color value that is formatted as A<<24+B<<16+G<<8+R
See also
ToABGR(void) const or FromARGB(uint32_t)

◆ FromARGB()

void Burger::RGBAWord8_t::FromARGB ( uint32_t uColor)
inline

Initialize the color with a 32 bit integer.


Convert the color from a 32 bit integer whereas A<<24+R<<16+G<<8+B and store the Alpha, Red, Green and Blue components

Parameters
uColor32 bit color value that is formatted as A<<24+R<<16+G<<8+B
See also
ToARGB(void) const or FromABGR(uint32_t)

◆ Interpolate()

void BURGER_API Burger::RGBAWord8_t::Interpolate ( const RGBAWord8_t * pFrom,
const RGBAWord8_t * pTo,
float fFactor )

Interpolates between two colors.


Interpolate with linear scaling between two colors. 0.0f will return the From color and 1.0f will return the To color and all factors in between will yield the proper mix of the two colors.

Parameters
pFromPointer to color convert from
pToPointer to color to convert o
fFactorInterpolation factor between 0.0f to 1.0f (0.0f = pFrom, 1.0f = pTo)

◆ ToABGR()

uint32_t Burger::RGBAWord8_t::ToABGR ( void ) const
inline

Convert the color to a ABGR 32 bit integer.


Convert the color into a 32 bit integer whereas A<<24+B<<16+G<<8+R

Returns
A 32 bit integer in native endian with the color
See also
ToARGB(void) const or FromABGR(uint32_t)

◆ ToARGB()

uint32_t Burger::RGBAWord8_t::ToARGB ( void ) const
inline

Convert the color to an ARGB 32 bit integer.


Convert the color into a 32 bit integer whereas A<<24+R<<16+G<<8+B

Returns
A 32 bit integer in native endian with the color
See also
ToABGR(void) const or FromARGB(uint32_t)

Member Data Documentation

◆ Aqua

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Aqua = {0,255,255,255}
static

RGBA 0,255,255,255 : 

◆ Black

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Black = {0,0,0,255}
static

RGBA 0,0,0,255 : 

◆ Blue

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Blue = {0,0,255,255}
static

RGBA 0,0,255,255 : 

◆ Fuchsia

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Fuchsia = {255,0,255,255}
static

RGBA 255,0,255,255 : 

◆ Gray

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Gray = {128,128,128,255}
static

RGBA 128,128,128,255 : 

◆ Green

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Green = {0,128,0,255}
static

RGBA 0,128,0,255 : 

◆ Lime

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Lime = {0,255,0,255}
static

RGBA 0,255,0,255 : 

◆ m_uAlpha

uint8_t Burger::RGBAWord8_t::m_uAlpha

8 bit alpha value

◆ m_uBlue

uint8_t Burger::RGBAWord8_t::m_uBlue

8 bit blue value

◆ m_uGreen

uint8_t Burger::RGBAWord8_t::m_uGreen

8 bit green value

◆ m_uRed

uint8_t Burger::RGBAWord8_t::m_uRed

8 bit red value

◆ Maroon

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Maroon = {128,0,0,255}
static

RGBA 128,0,0,255 : 

◆ Navy

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Navy = {0,0,128,255}
static

RGBA 0,0,128,255 : 

◆ Olive

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Olive = {128,128,0,255}
static

RGBA 128,128,0,255 : 

◆ Orange

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Orange = {255,165,0,255}
static

RGBA 255,165,0,255 : 

◆ Purple

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Purple = {128,0,128,255}
static

RGBA 128,0,128,255 : 

◆ Red

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Red = {255,0,0,255}
static

RGBA 255,0,0,255 : 

◆ Silver

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Silver = {192,192,192,255}
static

RGBA 192,192,192,255 : 

◆ Teal

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Teal = {0,128,128,255}
static

RGBA 0,128,128,255 : 

◆ White

const Burger::RGBAWord8_t Burger::RGBAWord8_t::White = {255,255,255,255}
static

RGBA 255,255,255,255 : 

◆ Yellow

const Burger::RGBAWord8_t Burger::RGBAWord8_t::Yellow = {255,255,0,255}
static

RGBA 255,255,0,255 :