Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: fbs.h
Link against: fbscli.lib

Class CFbsColor256BitmapUtil

CFbsColor256BitmapUtil

Support

Supported from 6.1

Description

Copies a bitmap in any display mode of at least 256 colours into a 256 colour bitmap, optionally using a user-defined palette.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CFbsColor256BitmapUtilCopies a bitmap in any display mode of at least 256 colours into a 256 colour bitmap, optionally using a user-defined palette

Defined in CFbsColor256BitmapUtil:
CopyBitmap(), EFloydSteinberg, ENoDither, NewL(), TDither

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CFbsColor256BitmapUtil* NewL(const CPalette* aPalette);

Description

Allocates and constructs a new 256 colour bitmap utility object, optionally specifying a palette.

Parameters

const CPalette* aPalette

The palette of colours to use for the destination 256 colour bitmap. If there are more than 256 colours in the palette, only the first 256 are used. May be NULL, in which case the system default 256 colour palette is used.

Return value

CFbsColor256BitmapUtil*

The newly constructed object.


CopyBitmap()

TInt CopyBitmap(CFbsBitmap* aColor256Destination,CFbsBitmap* aSource,TDither aDither=ENoDither);

Description

Copies the contents of a source bitmap to a destination 256 colour bitmap. Both bitmaps must be the same size and the destination bitmap's display mode must be EColor256.

Parameters

CFbsBitmap* aColor256Destination

The destination to copy the bitmap to. Its display mode must be EColor256.

CFbsBitmap* aSource

The source bitmap to copy from. Its display mode can be EColor16M, EColor64K, EColor4K or EColor256.

TDither aDither=ENoDither

Specify EFloydSteinberg for Floyd-Steinberg dithering. By default, no dithering.

Return value

TInt

KErrNone, if successful; otherwise, another of the system-wide error codes. KErrNotSupported is returned if aSource's display mode is not one of the values listed.

Panic codes

EFbsColor256UtilError

Either aColor256Destination's display mode is not EColor256, or the two bitmaps are not the same size.

[Top]


Enumerations


Enum TDither

TDither

Description

Indicates whether or not to use dithering.

ENoDither

No dithering.

EFloydSteinberg

Use the Floyd-Steinberg dithering algorithm.