Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nom::Color Class Reference

Utility class container for RGBA colors. More...

#include <Color.hpp>

Collaboration diagram for nom::Color:
[legend]

Public Member Functions

 Color (void)
 Default constructor; sets the color to their respective defaults.
 
 ~Color (void)
 Destructor.
 
 Color (const Color &color)
 Copy constructor.
 
 Color (uint8 red, uint8 green, uint8 blue)
 Constructor variant for setting a color using RGB values.
 
 Color (uint8 red, uint8 green, uint8 blue, uint8 alpha)
 Constructor variant for setting a color using RGBA values.
 
bool isNull (void) const
 
const Color & get (void) const
 Convenience getter for obtaining a copy of this object.
 
Color & operator= (const Color &other)
 Copy assignment operator.
 

Public Attributes

uint8 red
 
uint8 green
 
uint8 blue
 
uint8 alpha
 
uint8 & r = red
 Reference alias for red instance variable.
 
uint8 & g = green
 Reference alias for green instance variable.
 
uint8 & b = blue
 Reference alias for blue instance variable.
 
uint8 & a = alpha
 Reference alias for alpha instance variable.
 

Static Public Attributes

static const Color null
 Convenience object that will always contain a value of -1.
 
static const Color Black
 Predefined color constants for convenience sake.
 
static const Color White
 
static const Color Red
 
static const Color Green
 
static const Color Blue
 
static const Color Yellow
 
static const Color Magenta
 
static const Color Cyan
 
static const Color LightGray
 Additional predefined color constants.
 
static const Color Gray
 
static const Color NomPrimaryColorKey
 Sky blue color key.
 
static const Color NomSecondaryColorKey
 Light magenta color key.
 

Detailed Description

Utility class container for RGBA colors.

Todo:
Convert to a template class

Definition at line 43 of file Color.hpp.

Member Function Documentation

bool nom::Color::isNull ( void  ) const

Convenience method for determining if this object is initialized or not; an initialized object should never be equal to nom::Color::null

Todo:
Fully implement me

Definition at line 74 of file Color.cpp.


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