Aether
SDL2 based UI Framework for NX
Public Member Functions | List of all members
Aether::Colour Class Reference

Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive). More...

#include <Colour.hpp>

Public Member Functions

 Colour ()
 Alpha component. More...
 
 Colour (const unsigned char r, const unsigned char g, const unsigned char b, const unsigned char a)
 Constructor initializes colour with passed components. More...
 
unsigned char r () const
 Return the red component. More...
 
unsigned char g () const
 Return the green component. More...
 
unsigned char b () const
 Return the blue component. More...
 
unsigned char a () const
 Return the alpha component. More...
 
void setR (const unsigned char r)
 Set the red component of the colour. More...
 
void setG (const unsigned char g)
 Set the green component of the colour. More...
 
void setB (const unsigned char b)
 Set the blue component of the colour. More...
 
void setA (const unsigned char a)
 Set the alpha component of the colour. More...
 
void setColour (const unsigned char r, const unsigned char g, const unsigned char b, const unsigned char a)
 Set all components. More...
 

Detailed Description

Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive).

Constructor & Destructor Documentation

◆ Colour() [1/2]

Aether::Colour::Colour ( )

Alpha component.

Default constructor, initializes to opaque white.

◆ Colour() [2/2]

Aether::Colour::Colour ( const unsigned char  r,
const unsigned char  g,
const unsigned char  b,
const unsigned char  a 
)

Constructor initializes colour with passed components.

Parameters
rred component
ggreen component
bblue component
aalpha component

Member Function Documentation

◆ a()

unsigned char Aether::Colour::a ( ) const

Return the alpha component.

Returns
Alpha component of colour

◆ b()

unsigned char Aether::Colour::b ( ) const

Return the blue component.

Returns
Blue component of colour

◆ g()

unsigned char Aether::Colour::g ( ) const

Return the green component.

Returns
Green component of colour

◆ r()

unsigned char Aether::Colour::r ( ) const

Return the red component.

Returns
Red component of colour

◆ setA()

void Aether::Colour::setA ( const unsigned char  a)

Set the alpha component of the colour.

Parameters
aAlpha component of colour

◆ setB()

void Aether::Colour::setB ( const unsigned char  b)

Set the blue component of the colour.

Parameters
bBlue component of colour

◆ setColour()

void Aether::Colour::setColour ( const unsigned char  r,
const unsigned char  g,
const unsigned char  b,
const unsigned char  a 
)

Set all components.

Parameters
rRed component
gGreen component
bBlue component
aAlpha component

◆ setG()

void Aether::Colour::setG ( const unsigned char  g)

Set the green component of the colour.

Parameters
gGreen component of colour

◆ setR()

void Aether::Colour::setR ( const unsigned char  r)

Set the red component of the colour.

Parameters
rRed component of colour

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