alaCarte Maps
Renderer for OpenStreetMap tiles
Color Class Reference

#include <color.hpp>

Public Member Functions

 Color ()
 
 Color (const Color &_c)
 
 Color (const float _f)
 
 Color (const float _r, const float _g, const float _b)
 
 Color (const float _r, const float _g, const float _b, const float _a)
 
 Color (uint8 _r, uint8 _g, uint8 _b)
 
 Color (uint8 _r, uint8 _g, uint8 _b, uint8 _a)
 
 Color (const float *_c)
 
 Color (const uint8 *pComponent)
 
 Color (uint32 _c)
 
 operator uint32 () const
 
 operator float * ()
 
Coloroperator+= (const Color &c)
 
Coloroperator-= (const Color &c)
 
Coloroperator*= (const Color &c)
 
Coloroperator*= (const float f)
 
Coloroperator/= (const Color &c)
 
Coloroperator/= (const float f)
 
Color operator+ (const Color &_c) const
 
Color operator- (const Color &_c) const
 
Color operator- () const
 
Color operator* (const Color &_c) const
 
Color operator* (const float f) const
 
Color operator/ (const Color &_c) const
 
Color operator/ (const float f) const
 
bool operator== (const Color &_c) const
 
bool operator!= (const Color &_c) const
 
Color negate () const
 
Color negateA () const
 
Color min (const Color &_c) const
 
Color max (const Color &_c) const
 

Public Attributes

union {
   struct {
      float   r
 
      float   g
 
      float   b
 
      float   a
 
   } 
 
   struct {
      float   red
 
      float   green
 
      float   blue
 
      float   alpha
 
   } 
 
   float   c [4]
 
}; 
 

Static Public Attributes

static const Color Null
 
static const Color Black
 
static const Color White
 
static const Color Red
 
static const Color Green
 
static const Color Blue
 
static const Color Yellow
 
static const Color Grey
 
static const Color LightGrey
 

Friends

std::ostream & operator<< (std::ostream &stream, const Color &color)
 

Detailed Description

Definition at line 40 of file color.hpp.

Constructor & Destructor Documentation

Color::Color ( )
inline

Definition at line 43 of file color.hpp.

Color::Color ( const Color _c)
inline

Definition at line 44 of file color.hpp.

Color::Color ( const float  _f)
inline

Definition at line 45 of file color.hpp.

Color::Color ( const float  _r,
const float  _g,
const float  _b 
)
inlineexplicit

Definition at line 46 of file color.hpp.

Color::Color ( const float  _r,
const float  _g,
const float  _b,
const float  _a 
)
inlineexplicit

Definition at line 48 of file color.hpp.

Color::Color ( uint8  _r,
uint8  _g,
uint8  _b 
)
inlineexplicit

Definition at line 50 of file color.hpp.

Color::Color ( uint8  _r,
uint8  _g,
uint8  _b,
uint8  _a 
)
inlineexplicit

Definition at line 55 of file color.hpp.

Color::Color ( const float *  _c)
inline

Definition at line 60 of file color.hpp.

Color::Color ( const uint8 pComponent)
inline

Definition at line 62 of file color.hpp.

Color::Color ( uint32  _c)
inline

Definition at line 68 of file color.hpp.

Member Function Documentation

Color Color::max ( const Color _c) const
inline

Definition at line 108 of file color.hpp.

Color Color::min ( const Color _c) const
inline

Definition at line 107 of file color.hpp.

Color Color::negate ( ) const
inline

Definition at line 105 of file color.hpp.

Color Color::negateA ( ) const
inline

Definition at line 106 of file color.hpp.

Color::operator float * ( )
inline

Definition at line 84 of file color.hpp.

Color::operator uint32 ( ) const
inline

Definition at line 76 of file color.hpp.

bool Color::operator!= ( const Color _c) const
inline

Definition at line 102 of file color.hpp.

Color Color::operator* ( const Color _c) const
inline

Definition at line 96 of file color.hpp.

Color Color::operator* ( const float  f) const
inline

Definition at line 97 of file color.hpp.

Color& Color::operator*= ( const Color c)
inline

Definition at line 88 of file color.hpp.

Color& Color::operator*= ( const float  f)
inline

Definition at line 89 of file color.hpp.

Color Color::operator+ ( const Color _c) const
inline

Definition at line 93 of file color.hpp.

Color& Color::operator+= ( const Color c)
inline

Definition at line 86 of file color.hpp.

Color Color::operator- ( const Color _c) const
inline

Definition at line 94 of file color.hpp.

Color Color::operator- ( ) const
inline

Definition at line 95 of file color.hpp.

Color& Color::operator-= ( const Color c)
inline

Definition at line 87 of file color.hpp.

Color Color::operator/ ( const Color _c) const
inline

Definition at line 98 of file color.hpp.

Color Color::operator/ ( const float  f) const
inline

Definition at line 99 of file color.hpp.

Color& Color::operator/= ( const Color c)
inline

Definition at line 90 of file color.hpp.

Color& Color::operator/= ( const float  f)
inline

Definition at line 91 of file color.hpp.

bool Color::operator== ( const Color _c) const
inline

Definition at line 101 of file color.hpp.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const Color color 
)
friend

Definition at line 110 of file color.hpp.

Member Data Documentation

union { ... }
float Color::a

Definition at line 135 of file color.hpp.

float Color::alpha

Definition at line 142 of file color.hpp.

float Color::b

Definition at line 134 of file color.hpp.

const Color Color::Black
static

Definition at line 119 of file color.hpp.

const Color Color::Blue
static

Definition at line 123 of file color.hpp.

float Color::blue

Definition at line 141 of file color.hpp.

float Color::c[4]

Definition at line 144 of file color.hpp.

float Color::g

Definition at line 133 of file color.hpp.

const Color Color::Green
static

Definition at line 122 of file color.hpp.

float Color::green

Definition at line 140 of file color.hpp.

const Color Color::Grey
static

Definition at line 125 of file color.hpp.

const Color Color::LightGrey
static

Definition at line 126 of file color.hpp.

const Color Color::Null
static

Definition at line 118 of file color.hpp.

float Color::r

Definition at line 132 of file color.hpp.

const Color Color::Red
static

Definition at line 121 of file color.hpp.

float Color::red

Definition at line 139 of file color.hpp.

const Color Color::White
static

Definition at line 120 of file color.hpp.

const Color Color::Yellow
static

Definition at line 124 of file color.hpp.


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