Color Class Reference

#include <color.h>

List of all members.

Public Member Functions

 Color ()
 Color (Uint8 r, Uint8 g, Uint8 b, Uint8 a)
bool operator== (const Color &color) const
void SetColor (Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Uint8 GetRed () const
Uint8 GetGreen () const
Uint8 GetBlue () const
Uint8 GetAlpha () const
SDL_Color GetSDLColor () const

Public Attributes

Uint8 red
Uint8 green
Uint8 blue
Uint8 alpha


Detailed Description

Definition at line 27 of file color.h.


Constructor & Destructor Documentation

Color::Color (  ) 

Definition at line 25 of file color.cpp.

00025             {
00026         SetColor(200, 50, 50, 130);
00027 }

Here is the call graph for this function:

Color::Color ( Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Definition at line 29 of file color.cpp.

00029                                               {
00030         SetColor(r, g, b, a);
00031 }

Here is the call graph for this function:


Member Function Documentation

Uint8 Color::GetAlpha (  )  const

Definition at line 59 of file color.cpp.

00059                            {
00060         return alpha;
00061 }

Here is the caller graph for this function:

Uint8 Color::GetBlue (  )  const

Definition at line 55 of file color.cpp.

00055                           {
00056         return blue;
00057 }

Here is the caller graph for this function:

Uint8 Color::GetGreen (  )  const

Definition at line 51 of file color.cpp.

00051                            {
00052         return green;
00053 }

Here is the caller graph for this function:

Uint8 Color::GetRed (  )  const

Definition at line 47 of file color.cpp.

00047                          {
00048         return red;
00049 }

Here is the caller graph for this function:

SDL_Color Color::GetSDLColor (  )  const

Definition at line 63 of file color.cpp.

00063                                   {
00064         SDL_Color sdlColor;
00065 
00066         sdlColor.r = red;
00067         sdlColor.g = green;
00068         sdlColor.b = blue;
00069         sdlColor.unused = alpha;
00070 
00071         return sdlColor;
00072 }

Here is the caller graph for this function:

bool Color::operator== ( const Color color  )  const

Definition at line 33 of file color.cpp.

00033                                               {
00034         return red == color.red 
00035                 && green == color.green 
00036                 && blue == color.blue 
00037                 && alpha == color.alpha;
00038 }

void Color::SetColor ( Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Definition at line 40 of file color.cpp.

00040                                                       {
00041         red = r;
00042         green = g;
00043         blue = b;
00044         alpha = a;
00045 }

Here is the caller graph for this function:


Member Data Documentation

Uint8 Color::alpha

Definition at line 35 of file color.h.

Uint8 Color::blue

Definition at line 34 of file color.h.

Uint8 Color::green

Definition at line 33 of file color.h.

Uint8 Color::red

Definition at line 32 of file color.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 1 13:42:30 2007 for Wormux by  doxygen 1.4.7