Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <imageprocessor.h>
Link against: imageconversion.lib

Class TColorConvertor

class TColorConvertor;

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.

Members

Defined in TColorConvertor:


Construction and destruction


NewL(TDisplayMode)

IMPORT_C static TColorConvertor* NewL(TDisplayMode aDisplayMode);

Description

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

Parameters

TDisplayMode aDisplayMode

The display mode. This determines the TColorConvertor derived type returned.

Return value

TColorConvertor *

A pointer to a fully constructed TColorConvertor derived object.

Leave codes

KErrNotSupported

The display mode is not supported.

[Top]


Member functions


ColorIndex(TRgb)const

virtual TInt ColorIndex(TRgb aColor) const=0;

Description

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

TRgb aColor

The colour in RGB format.

Return value

TInt

The colour index.


Color(TInt)const

virtual TRgb Color(TInt aColorIndex) const=0;

Description

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

TInt aColorIndex

The colour in RGB format.

Return value

TRgb

The RGB value.


ColorToIndex(TInt *,TRgb *,TInt)const

virtual void ColorToIndex(TInt *aIndexBuffer, TRgb *aColorBuffer, TInt aCount) const=0;

Description

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

TInt *aIndexBuffer

A pointer to the first element in destination array.

TRgb *aColorBuffer

A pointer to the first element in the source array.

TInt aCount

The number of elements to get.


RgbToMonochrome(TRgb)

static inline TInt RgbToMonochrome(TRgb aRgb);

Description

Parameters

TRgb aRgb

Return value

TInt