omegalib  13.1
omega::Color Class Reference

#include <Color.h>

Public Member Functions

const float & operator[] (int i) const
 
float & operator[] (int i)
 
float * data ()
 
const float * data () const
 
String toString () const
 Converts color to a hexadecimal color string. More...
 
 Color (float r=1.0f, float g=1.0f, float b=1.0f, float a=1.0f)
 
 Color (const Color &color)
 
 Color (const String &name)
 
float getRed () const
 
void setRed (float value)
 
float getGreen () const
 
void setGreen (float value)
 
float getBlue () const
 
void setBlue (float value)
 
float getAlpha () const
 
void setAlpha (float value)
 
Color scale (float f, bool alpha=false)
 

Static Public Member Functions

static const ColorgetColorByIndex (int index)
 
static bool isValidColor (const String &lname)
 

Static Public Attributes

static const Color White
 
static const Color Black
 
static const Color Orange
 
static const Color Silver
 
static const Color Gray
 
static const Color Red
 
static const Color Maroon
 
static const Color Yellow
 
static const Color Olive
 
static const Color Lime
 
static const Color Green
 
static const Color Aqua
 
static const Color Teal
 
static const Color Blue
 
static const Color Navy
 
static const Color Fuchsia
 
static const Color Purple
 

Constructor & Destructor Documentation

omega::Color::Color ( float  r = 1.0f,
float  g = 1.0f,
float  b = 1.0f,
float  a = 1.0f 
)
inline
omega::Color::Color ( const Color color)
inline
omega::Color::Color ( const String name)
inline

Member Function Documentation

float* omega::Color::data ( )
inline
const float* omega::Color::data ( ) const
inline
float omega::Color::getAlpha ( ) const
inline
float omega::Color::getBlue ( ) const
inline
static const Color& omega::Color::getColorByIndex ( int  index)
static
float omega::Color::getGreen ( ) const
inline
float omega::Color::getRed ( ) const
inline
static bool omega::Color::isValidColor ( const String lname)
inlinestatic
const float& omega::Color::operator[] ( int  i) const
inline
float& omega::Color::operator[] ( int  i)
inline
Color omega::Color::scale ( float  f,
bool  alpha = false 
)
inline
void omega::Color::setAlpha ( float  value)
inline
void omega::Color::setBlue ( float  value)
inline
void omega::Color::setGreen ( float  value)
inline
void omega::Color::setRed ( float  value)
inline
String omega::Color::toString ( ) const

Converts color to a hexadecimal color string.

Remarks
string format is #RRGGBBAA

Member Data Documentation

const Color omega::Color::Aqua
static
const Color omega::Color::Black
static
const Color omega::Color::Blue
static
const Color omega::Color::Fuchsia
static
const Color omega::Color::Gray
static
const Color omega::Color::Green
static
const Color omega::Color::Lime
static
const Color omega::Color::Maroon
static
const Color omega::Color::Navy
static
const Color omega::Color::Olive
static
const Color omega::Color::Orange
static
const Color omega::Color::Purple
static
const Color omega::Color::Red
static
const Color omega::Color::Silver
static
const Color omega::Color::Teal
static
const Color omega::Color::White
static
const Color omega::Color::Yellow
static

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