Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Outline Class Reference


Detailed Description

Outline around picture.

Used to outline rendered text.

Definition at line 10 of file Outline.h.

Public Member Functions

 Outline (const SDL_Color &color, int width)
void drawOnColorKey (SDL_Surface *surface)
 Draw outline, use surface colorkey as bg color.
void drawOn (SDL_Surface *surface, Uint32 bgKey)
 Draw outline on bg color.


Constructor & Destructor Documentation

Outline::Outline const SDL_Color &  color,
int  width
 

Definition at line 17 of file Outline.cpp.

00018     : m_color(color)
00019 {
00020     m_width = width;
00021     m_pixel = 0;
00022 }


Member Function Documentation

void Outline::drawOn SDL_Surface *  surface,
Uint32  bgKey
 

Draw outline on bg color.

Parameters:
surface picture with shape to outline
bgKey color used for background

Definition at line 40 of file Outline.cpp.

00041 {
00042     SurfaceLock lock1(surface);
00043 
00044     precomputePixel(surface->format);
00045     for (int i = 0; i < m_width; ++i) {
00046         drawOneLayer(surface, bgKey);
00047     }
00048 }

void Outline::drawOnColorKey SDL_Surface *  surface  ) 
 

Draw outline, use surface colorkey as bg color.

Definition at line 28 of file Outline.cpp.

00029 {
00030     Uint32 bgKey = surface->format->colorkey;
00031     drawOn(surface, bgKey);
00032 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:56:08 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2