CartoType API
Public Member Functions | Public Attributes
CartoType::TSimplePalette< aColors > Class Template Reference

#include <cartotype_graphics.h>

Inheritance diagram for CartoType::TSimplePalette< aColors >:
CartoType::MPalette

List of all members.

Public Member Functions

TColor Foreground (int32 aIndex) const
TColor Background (int32 aIndex) const
int32 Count () const
int32 AddEntry (TResult &aError, TColor aForeground, TColor aBackground)

Public Attributes

int32 iEntries
TColor iForeground [aColors]
TColor iBackground [aColors]

Detailed Description

template<int32 aColors>
class CartoType::TSimplePalette< aColors >

A simple templated palette class for any number of colors.


Member Function Documentation

template<int32 aColors>
int32 CartoType::TSimplePalette< aColors >::AddEntry ( TResult aError,
TColor  aForeground,
TColor  aBackground 
) [inline, virtual]

Add a new entry if possible, returning its index. If the combination of foreground and background colors already exists in the palette, returns its index. Return 0 and set aError if the operation fails.

Implements CartoType::MPalette.

template<int32 aColors>
TColor CartoType::TSimplePalette< aColors >::Background ( int32  aIndex) const [inline, virtual]

Supply a background for color index aIndex. If the 'null color' KTransparentBlack is supplied no background is drawn.

Implements CartoType::MPalette.

template<int32 aColors>
int32 CartoType::TSimplePalette< aColors >::Count ( ) const [inline, virtual]

Return the number of entries in the palette.

Implements CartoType::MPalette.

template<int32 aColors>
TColor CartoType::TSimplePalette< aColors >::Foreground ( int32  aIndex) const [inline, virtual]

Supply a color for color index aIndex.

Implements CartoType::MPalette.


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