SDL++
C++wrapperfortheSDLlibrary.

sdl::misc::Color Class Reference

Represents an RGBA color. More...

#include <Color.h>

List of all members.

Public Member Functions

 Color (SDL_Color *c)
 Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
SDL_Color * operator* () const
unsigned char red () const
Colorred (unsigned char r)
unsigned char green () const
Colorgreen (unsigned char g)
unsigned char blue () const
Colorblue (unsigned char b)
unsigned char alpha () const
Coloralpha (unsigned char a)

Detailed Description

Represents an RGBA color.

Definition at line 34 of file Color.h.


Constructor & Destructor Documentation

sdl::misc::Color::Color ( SDL_Color *  c) [inline]

Constructs a Color from a SDL_Color structure.

Parameters:
cThe SDL_Color structure.

Definition at line 41 of file Color.h.

sdl::misc::Color::Color ( unsigned char  red,
unsigned char  green,
unsigned char  blue,
unsigned char  alpha 
) [inline]

Constructs a Color.

Parameters:
red,Thered intensity.
green,Thegreen intensity.
blue,Theblue intensity.
alpha,Thealpha intensity.

Definition at line 51 of file Color.h.


Member Function Documentation

unsigned char sdl::misc::Color::alpha ( ) const [inline]

Returns the alpha intensity.

Returns:
The alpha intensity.

Definition at line 136 of file Color.h.

Color& sdl::misc::Color::alpha ( unsigned char  a) [inline]

Sets the alpha intensity.

Returns:
A reference to this Color.

Definition at line 145 of file Color.h.

unsigned char sdl::misc::Color::blue ( ) const [inline]

Returns the blue intensity.

Returns:
The blue intensity.

Definition at line 115 of file Color.h.

Color& sdl::misc::Color::blue ( unsigned char  b) [inline]

Sets the blue intensity.

Parameters:
Theblue intensity.
Returns:
A reference to this Color.

Definition at line 126 of file Color.h.

Color& sdl::misc::Color::green ( unsigned char  g) [inline]

Sets the green intensity.

Parameters:
gThe green intensity.
Returns:
A reference to this Color.

Definition at line 105 of file Color.h.

unsigned char sdl::misc::Color::green ( ) const [inline]

Returns the green intensity.

Returns:
The green intensity.

Definition at line 94 of file Color.h.

SDL_Color* sdl::misc::Color::operator* ( ) const [inline]

Definition at line 64 of file Color.h.

Color& sdl::misc::Color::red ( unsigned char  r) [inline]

Sets the red intensity.

Parameters:
rThe red intensity.
Returns:
A reference to this Color.

Definition at line 84 of file Color.h.

unsigned char sdl::misc::Color::red ( ) const [inline]

Returns the red intensity.

Returns:
The red intensity.

Definition at line 73 of file Color.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs