CFbsColor256BitmapUtil Class Reference

#include <fbs.h>

Link against: fbscli.lib

class CFbsColor256BitmapUtil : public CBase

Inherits from

  • CFbsColor256BitmapUtil

Detailed Description

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

Member Enumeration Documentation

Enum TDither

Indicates whether or not to use dithering.

EnumeratorValueDescription
ENoDither

No dithering.

EFloydSteinberg

Use the Floyd-Steinberg dithering algorithm.

Constructor & Destructor Documentation

~CFbsColor256BitmapUtil ( )

~CFbsColor256BitmapUtil()

Member Function Documentation

CopyBitmap ( CFbsBitmap *, CFbsBitmap *, TDither )

IMPORT_C TIntCopyBitmap(CFbsBitmap *aColor256Destination,
CFbsBitmap *aSource,
TDitheraDither = ENoDither
)

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
aColor256DestinationThe destination to copy the bitmap to. Its display mode must be EColor256.
aSourceThe source bitmap to copy from. Its display mode can be EColor16M, EColor64K, EColor4K or EColor256.
aDitherSpecify EFloydSteinberg for Floyd-Steinberg dithering. By default, no dithering.
Return Value
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
EFbsColor256UtilErrorEither aColor256Destination's display mode is not EColor256, or the two bitmaps are not the same size.

NewL ( const CPalette * )

IMPORT_C CFbsColor256BitmapUtil *NewL(const CPalette *aPalette)[static]

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

Parameters
aPaletteThe 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
The newly constructed object.