Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PG_Color Class Reference

Allows for an abstraction of a particular color. More...

#include <pgcolor.h>

List of all members.

Public Member Functions

 PG_Color ()
 PG_Color (const SDL_Color &c)
 PG_Color (Uint32 c)
 PG_Color (Uint8 r, Uint8 g, Uint8 b)
PG_Coloroperator= (const SDL_Color &c)
PG_Coloroperator= (Uint32 c)
 operator Uint32 () const
Uint32 MapRGB (SDL_PixelFormat *format) const
Uint32 MapRGBA (SDL_PixelFormat *format, Uint8 a) const
bool operator!= (const PG_Color &c) const


Detailed Description

Allows for an abstraction of a particular color.

The purpose of this is to allow one to create new colors. If one is interested in using predefined color constants, see pgcolors.h (note the letter "s" at the end.) A PG_Color can be created from an SDL_Color, a Uint32, or RGB based system.

Author:
Alexander Pipelka

Definition at line 33 of file pgcolor.h.


Constructor & Destructor Documentation

PG_Color::PG_Color  ) 
 

Definition at line 15 of file pgcolor.cpp.

PG_Color::PG_Color const SDL_Color &  c  ) 
 

Definition at line 21 of file pgcolor.cpp.

PG_Color::PG_Color Uint32  c  ) 
 

Definition at line 25 of file pgcolor.cpp.

PG_Color::PG_Color Uint8  r,
Uint8  g,
Uint8  b
 

Definition at line 29 of file pgcolor.cpp.


Member Function Documentation

Uint32 PG_Color::MapRGB SDL_PixelFormat *  format  )  const [inline]
 

Definition at line 46 of file pgcolor.h.

Referenced by PG_Widget::DrawHLine(), PG_Widget::DrawVLine(), parseObjectProps(), PG_Draw::DrawGradient(), PG_Draw::DrawThemedSurface(), PG_Draw::SetPixel(), PG_Application::RedrawBackground(), and PG_ThemeWidget::SetBackground().

Uint32 PG_Color::MapRGBA SDL_PixelFormat *  format,
Uint8  a
const [inline]
 

Definition at line 50 of file pgcolor.h.

Referenced by PG_ThemeWidget::eventBlit(), BarGraphWidget::eventBlit(), and GraphWidget::mapColor().

PG_Color::operator Uint32  )  const
 

Definition at line 49 of file pgcolor.cpp.

bool PG_Color::operator!= const PG_Color c  )  const [inline]
 

Definition at line 54 of file pgcolor.h.

PG_Color & PG_Color::operator= Uint32  c  ) 
 

Definition at line 41 of file pgcolor.cpp.

PG_Color & PG_Color::operator= const SDL_Color &  c  ) 
 

Definition at line 33 of file pgcolor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:18:49 2008 for Advanced Strategic Command by  doxygen 1.4.2