Gel2D - The free/open source game creation suite

Public Member Functions | Public Attributes
gel::GelColor Class Reference

Scalar RGBA color class. More...

#include <gelColor.h>

List of all members.

Public Member Functions

 GelColor ()
 Default constructor.
 GelColor (float red, float green, float blue, float alpha)
 Full color constructor.
 GelColor (float value)
 Single color constructor.
 GelColor (const GelHWColor &col)
 GelHWColor constructor.
 GelColor (const GelRGBA &col)
 GelRGBA constructor.
 GelColor (const GelHSLA &col)
 GelHSLA constructor.
void clamp ()
void setRGB (float red, float green, float blue)
 Sets the RGB values of the GelColor.
GelColor operator+ (const GelColor &c) const
GelColor operator- (const GelColor &c) const
GelColor operator* (const GelColor &c) const
GelColor operator/ (const GelColor &c) const
GelColor operator= (const GelColor &c)
GelColor operator+= (const GelColor &c)
GelColor operator-= (const GelColor &c)
GelColor operator*= (const GelColor &c)
GelColor operator/= (const GelColor &c)
bool operator== (const GelColor &c) const
bool operator!= (const GelColor &c) const

Public Attributes

float r
 Red component.
float g
 Green component.
float b
 Blue component.
float a
 Alpha component.

Detailed Description

Scalar RGBA color class.

This class stores each color channel as a float. Range: 0.0f-1.0f.
This is the native color model in Gel2D.


Constructor & Destructor Documentation

gel::GelColor::GelColor ( ) [inline]

Default constructor.

gel::GelColor::GelColor ( float  red,
float  green,
float  blue,
float  alpha 
) [inline]

Full color constructor.

Parameters:
red: Red value.
green: Green value.
blue: Blue value.
alpha: Alpha value.
gel::GelColor::GelColor ( float  value) [inline]

Single color constructor.

Parameters:
value: Value to apply to all components.
gel::GelColor::GelColor ( const GelHWColor col)

GelHWColor constructor.

Parameters:
col: Color to assign.
gel::GelColor::GelColor ( const GelRGBA col)

GelRGBA constructor.

Parameters:
col: Color to assign.
gel::GelColor::GelColor ( const GelHSLA col)

GelHSLA constructor.

Parameters:
col: Color to assign.

Member Function Documentation

void gel::GelColor::clamp ( ) [inline]
void gel::GelColor::setRGB ( float  red,
float  green,
float  blue 
) [inline]

Sets the RGB values of the GelColor.

Parameters:
red: New red value.
green: New green value.
blue: New blue value.
GelColor gel::GelColor::operator+ ( const GelColor c) const [inline]
GelColor gel::GelColor::operator- ( const GelColor c) const [inline]
GelColor gel::GelColor::operator* ( const GelColor c) const [inline]
GelColor gel::GelColor::operator/ ( const GelColor c) const [inline]
GelColor gel::GelColor::operator= ( const GelColor c) [inline]
GelColor gel::GelColor::operator+= ( const GelColor c) [inline]
GelColor gel::GelColor::operator-= ( const GelColor c) [inline]
GelColor gel::GelColor::operator*= ( const GelColor c) [inline]
GelColor gel::GelColor::operator/= ( const GelColor c) [inline]
bool gel::GelColor::operator== ( const GelColor c) const [inline]
bool gel::GelColor::operator!= ( const GelColor c) const [inline]

Member Data Documentation

Red component.

Green component.

Blue component.

Alpha component.


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