Gel2D - The free/open source game creation suite

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

RGBA color class. More...

#include <gelColor.h>

List of all members.

Public Member Functions

 GelRGBA ()
 Default constructor.
 GelRGBA (int red, int green, int blue, int alpha)
 Full color constructor.
 GelRGBA (int value)
 Single color constructor.
 GelRGBA (const GelHWColor &col)
 GelHWColor constructor.
 GelRGBA (const GelColor &col)
 GelColor constructor.
 GelRGBA (const GelHSLA &col)
 GelHSLA constructor.
GelRGBA operator+ (const GelRGBA &c) const
GelRGBA operator- (const GelRGBA &c) const
GelRGBA operator* (const GelRGBA &c) const
GelRGBA operator/ (const GelRGBA &c) const
GelRGBA operator= (const GelRGBA &c)
GelRGBA operator+= (const GelRGBA &c)
GelRGBA operator-= (const GelRGBA &c)
GelRGBA operator*= (const GelRGBA &c)
GelRGBA operator/= (const GelRGBA &c)
bool operator== (const GelRGBA &c) const
bool operator!= (const GelRGBA &c) const

Public Attributes

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

Detailed Description

RGBA color class.

This class stores each color channel as an integer. Range: 0-255.


Constructor & Destructor Documentation

gel::GelRGBA::GelRGBA ( ) [inline]

Default constructor.

gel::GelRGBA::GelRGBA ( int  red,
int  green,
int  blue,
int  alpha 
) [inline]

Full color constructor.

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

Single color constructor.

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

GelHWColor constructor.

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

GelColor constructor.

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

GelHSLA constructor.

Parameters:
col: Color to assign.

Member Function Documentation

GelRGBA gel::GelRGBA::operator+ ( const GelRGBA c) const [inline]
GelRGBA gel::GelRGBA::operator- ( const GelRGBA c) const [inline]
GelRGBA gel::GelRGBA::operator* ( const GelRGBA c) const [inline]
GelRGBA gel::GelRGBA::operator/ ( const GelRGBA c) const [inline]
GelRGBA gel::GelRGBA::operator= ( const GelRGBA c) [inline]
GelRGBA gel::GelRGBA::operator+= ( const GelRGBA c) [inline]
GelRGBA gel::GelRGBA::operator-= ( const GelRGBA c) [inline]
GelRGBA gel::GelRGBA::operator*= ( const GelRGBA c) [inline]
GelRGBA gel::GelRGBA::operator/= ( const GelRGBA c) [inline]
bool gel::GelRGBA::operator== ( const GelRGBA c) const [inline]
bool gel::GelRGBA::operator!= ( const GelRGBA 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: