TColorConvertor Class Reference

#include <icl/imageprocessor.h>

class TColorConvertor
Public Member Functions
pure virtual TRgb Color(TInt)
pure virtual TInt ColorIndex(TRgb)
pure virtual voidColorToIndex(TInt *, TRgb *, TInt)
IMPORT_C TColorConvertor *NewL(TDisplayMode)
TInt RgbToMonochrome(TRgb)

Detailed Description

Interface to colour conversion classes for various display modes. Manages the mapping between RGB/Greyscale values and the index into the color palette for the given display mode.

Member Function Documentation

Color ( TInt )

TRgb Color(TIntaColorIndex)const [pure virtual]

Returns the RGB value corresponding to the supplied colour index. Operates in the context of the current display mode.

This is a virtual function that each derived class must implement.

Parameters
aColorIndexThe colour in RGB format.
Return Value
The RGB value.

ColorIndex ( TRgb )

TInt ColorIndex(TRgbaColor)const [pure virtual]

Returns the colour index corresponding to the supplied RGB value. Operates in the context of the current display mode.

This is a virtual function that each derived class must implement.

Parameters
aColorThe colour in RGB format.
Return Value
The colour index.

ColorToIndex ( TInt *, TRgb *, TInt )

voidColorToIndex(TInt *aIndexBuffer,
TRgb *aColorBuffer,
TIntaCount
)const [pure virtual]

Gets an array of colour indices from a corresponding array of RGB values. Operates in the context of the current display mode.

This is a virtual function that each derived class must implement.

Parameters
aIndexBufferA pointer to the first element in destination array.
aColorBufferA pointer to the first element in the source array.
aCountThe number of elements to get.

NewL ( TDisplayMode )

IMPORT_C TColorConvertor *NewL(TDisplayModeaDisplayMode)[static]

Static factory function for creating instances of TColorConvertor derived classes based on the supplied display mode.

Parameters
aDisplayModeThe display mode. This determines the TColorConvertor derived type returned.
Return Value
A pointer to a fully constructed TColorConvertor derived object.
Leave Codes
KErrNotSupportedThe display mode is not supported.

RgbToMonochrome ( TRgb )

TInt RgbToMonochrome(TRgbaRgb)[static, inline]