Advanced Strategic Command
Public Member Functions | List of all members
DI_Color Class Reference

A Device Independent color. Shamelessly pinched from Paragui to reduce coupling. More...

#include <surface.h>

Inheritance diagram for DI_Color:
Inheritance graph
[legend]

Public Member Functions

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

Detailed Description

A Device Independent color. Shamelessly pinched from Paragui to reduce coupling.

Definition at line 30 of file surface.h.

Constructor & Destructor Documentation

DI_Color::DI_Color ( )

Definition at line 33 of file surface.cpp.

DI_Color::DI_Color ( const SDL_Color &  c)

Definition at line 39 of file surface.cpp.

DI_Color::DI_Color ( Uint32  c)

Definition at line 43 of file surface.cpp.

DI_Color::DI_Color ( Uint8  r,
Uint8  g,
Uint8  b 
)

Definition at line 47 of file surface.cpp.

Member Function Documentation

Uint32 DI_Color::MapRGB ( SDL_PixelFormat *  format) const
inline

Definition at line 43 of file surface.h.

Uint32 DI_Color::MapRGBA ( SDL_PixelFormat *  format,
Uint8  a 
) const
inline

Definition at line 47 of file surface.h.

Referenced by DamageBarWidget::eventBlit(), and WholeMapRenderer::renderVisibility().

bool DI_Color::operator!= ( const DI_Color c) const
inline

Definition at line 51 of file surface.h.

References operator==().

DI_Color & DI_Color::operator= ( const SDL_Color &  c)

Definition at line 51 of file surface.cpp.

DI_Color & DI_Color::operator= ( Uint32  c)

Definition at line 59 of file surface.cpp.

bool DI_Color::operator== ( const DI_Color c) const
inline

Definition at line 55 of file surface.h.

Referenced by operator!=().


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