Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

CSArea Class Reference

#include <CSArea.h>

Inheritance diagram for CSArea:

CSGradientArea CSPictureArea CSRoundedArea

Public Member Functions

virtual std::string getType ()
 CSArea ()
virtual ~CSArea ()
virtual void paint (SDL_Surface *destination, SDL_Rect *parentViewport)
void setColor (int color)

Static Public Attributes

const char * CLASS = "CSArea"

Protected Attributes

int mColor

Constructor & Destructor Documentation

CSArea::CSArea  ) 
 

Todo:
gradient areas, picture (background areas, strechted ord centered) rounded corner areas none of should be difficult!

Definition at line 19 of file CSArea.cpp.

References LOG_ENTER, LOG_EXIT, and mColor.

00020 {
00021     static char *functionName="CSArea";
00022     LOG_ENTER 
00023     mColor = 0;
00024     LOG_EXIT
00025 }

virtual CSArea::~CSArea  )  [inline, virtual]
 

Definition at line 29 of file CSArea.h.

00029 {}


Member Function Documentation

virtual std::string CSArea::getType  )  [inline, virtual]
 

Reimplemented in CSRoundedArea, CSGradientArea, and CSPictureArea.

Definition at line 27 of file CSArea.h.

References CLASS.

00027 {return (std::string) CLASS;}

void CSArea::paint SDL_Surface *  destination,
SDL_Rect *  parentViewport
[virtual]
 

Reimplemented in CSRoundedArea, CSGradientArea, and CSPictureArea.

Definition at line 27 of file CSArea.cpp.

References mColor.

Referenced by CSGrafikElement::paintAreaStandard().

00028 {
00029     static char *functionName="paint";
00030 /*
00031     // simple shading!  
00032     SDL_Rect areaCopy;
00033     for (int i= 0; i<=area->h; i++)
00034     {
00035         areaCopy = *area;
00036         areaCopy.y += i;
00037         areaCopy.h = 1;
00038         SDL_FillRect(destination, &areaCopy, CSHelper::colorPercent(mColor, 50+50*i/area->h));
00039 
00040     }
00041 
00042 */
00043     SDL_FillRect(destination, area, mColor);
00044 }

void CSArea::setColor int  color  )  [inline]
 

Definition at line 31 of file CSArea.h.

References mColor.

Referenced by CSLAF::getAreaInternal(), and CSGrafikElement::paintAreaStandard().

00031 {mColor = color;}


Field Documentation

int CSArea::mColor [protected]
 

Definition at line 23 of file CSArea.h.

Referenced by CSArea(), paint(), and setColor().

const char * CSArea::CLASS = "CSArea" [static]
 

Reimplemented in CSRoundedArea, CSGradientArea, and CSPictureArea.

Definition at line 11 of file CSArea.cpp.

Referenced by getType().


Generated on Wed Jul 14 00:43:47 2004 for CSLib by doxygen 1.3.6