Home

Dokumentation

Impressum

Dokumentation VDR
 

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

cPalette Class Reference

#include <osdbase.h>

Inheritance diagram for cPalette:

Inheritance graph
[legend]

Detailed Description

Set DVB colors.

Uses colors from eDVbColors to set DVB colors

Definition at line 70 of file osdbase.h.

Public Methods

 cPalette (int Bpp)
int Index (eDvbColor Color)
void Reset (void)
void SetColor (int Index, eDvbColor Color)
eDvbColor GetColor (int Index)
const eDvbColorNewColors (int &FirstColor, int &LastColor)
const eDvbColorAllColors (int &NumColors)
void Take (const cPalette &Palette, tIndexes *Indexes=NULL)

Protected Types

typedef unsigned char tIndexes [MAXNUMCOLORS]

Private Attributes

eDvbColor color [MAXNUMCOLORS]
int maxColors
 number of valid entries in complete color table

int numColors
 number of valid entries in complete color table

bool used [MAXNUMCOLORS]
bool fetched [MAXNUMCOLORS]
 fetch number of color maximum

bool full


Member Typedef Documentation

typedef unsigned char cPalette::tIndexes[MAXNUMCOLORS] [protected]
 

Definition at line 82 of file osdbase.h.

Referenced by cBitmap::SetBitmap().


Constructor & Destructor Documentation

cPalette::cPalette int    Bpp
 

--- cPalette --------------------------------------------------------------

Definition at line 22 of file osdbase.c.

References full, maxColors, and numColors.


Member Function Documentation

const eDvbColor * cPalette::AllColors int &    NumColors
 

Returns a pointer to the complete color table and stores the number of valid entries in NumColors. If no colors have been stored yet, NumColors will be set to 0 and the function will return NULL.

Definition at line 92 of file osdbase.c.

References color, eDvbColor, and numColors.

eDvbColor cPalette::GetColor int    Index [inline]
 

Definition at line 88 of file osdbase.h.

References clrBlack, and eDvbColor.

int cPalette::Index eDvbColor    Color
 

Definition at line 40 of file osdbase.c.

References color, eDvbColor, esyslog, fetched, full, maxColors, numColors, and used.

Referenced by cOsdBase::AddColor(), cBitmap::Fill(), cBitmap::SetPixel(), Take(), and cBitmap::Text().

const eDvbColor * cPalette::NewColors int &    FirstColor,
int &    LastColor
 

With every call this function returns a consecutive range of color entries that have been added since the last call. The return value is the address of the first new color, and the index of the first and last new color are returned in the given int parameters. If there are no new color entries, NULL will be returned.

Definition at line 79 of file osdbase.c.

References color, eDvbColor, fetched, and numColors.

Referenced by cDvbOsd::CommitWindow().

void cPalette::Reset void   
 

Definition at line 72 of file osdbase.c.

References full, numColors, and used.

Referenced by cOsdBase::AddColor(), and cBitmap::Clear().

void cPalette::SetColor int    Index,
eDvbColor    Color
 

Definition at line 29 of file osdbase.c.

References color, fetched, maxColors, numColors, and used.

Referenced by cDvbSpuBitmap::getBitmap().

void cPalette::Take const cPalette &    Palette,
tIndexes   Indexes = NULL
 

Definition at line 98 of file osdbase.c.

References color, Index(), numColors, and used.

Referenced by cBitmap::SetBitmap().


Field Documentation

eDvbColor cPalette::color[MAXNUMCOLORS] [private]
 

Definition at line 72 of file osdbase.h.

Referenced by AllColors(), Index(), NewColors(), SetColor(), and Take().

bool cPalette::fetched[MAXNUMCOLORS] [private]
 

fetch number of color maximum

Definition at line 79 of file osdbase.h.

Referenced by Index(), NewColors(), and SetColor().

bool cPalette::full [private]
 

Definition at line 80 of file osdbase.h.

Referenced by cPalette(), Index(), and Reset().

int cPalette::maxColors [private]
 

number of valid entries in complete color table

Definition at line 75 of file osdbase.h.

Referenced by cPalette(), Index(), and SetColor().

int cPalette::numColors [private]
 

number of valid entries in complete color table

Definition at line 75 of file osdbase.h.

Referenced by AllColors(), cPalette(), Index(), NewColors(), Reset(), SetColor(), and Take().

bool cPalette::used[MAXNUMCOLORS] [private]
 

Definition at line 76 of file osdbase.h.

Referenced by Index(), Reset(), SetColor(), and Take().


The documentation for this class was generated from the following files:
Generated on Wed Feb 5 23:31:47 2003 for VDR by doxygen1.3-rc2