Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: fbs.h
Link against: fbscli.lib

Class CFbsBitmap

class CFbsBitmap : public CBase;

Description

Note that this class is not intended for user derivation. A bitmap managed by the font and bitmap server. The class also defines some palette functionality which is not yet implemented, since none of the modes currently supported by screen or bitmaps require variable palettes. Note that the CFbsBitmap format is internal to Symbian, but the Image Converter API can be used to convert such bitmaps to standard formats. CFbsBitmap instances cannot be shared between different threads. They use some shared thread local storage data. If you want to share a bitmap between threads, use Duplicate().

Derivation

Members

Defined in CFbsBitmap:
CleanAddress(), CleanAddress(), Compress(), Compress(), CompressInBackground(), CompressInBackground(), CompressInBackground(), CompressInBackground(), Create(), CreateHardwareBitmap(), DataAddress(), DisplayMode(), Duplicate(), ExternalizeL(), ExternalizeRectangleL(), GetPalette(), GetPixel(), GetScanLine(), GetScanLine(), GetVerticalScanLine(), GetVerticalScanLine(), Handle(), HardwareBitmapHandle(), Header(), HorizontalPixelsToTwips(), HorizontalTwipsToPixels(), InitialDisplayMode(), InternalizeL(), IsCompressedInRAM(), IsFileInRom(), IsFileInRom(), IsLargeBitmap(), IsMonochrome(), IsRomBitmap(), Load(), Load(), Load(), Load(), LoadAndCompress(), LoadAndCompress(), LoadAndCompress(), LoadAndCompress(), LockHeap(), LockHeapLC(), PaletteAttributes(), Reset(), Resize(), Save(), Save(), ScanLineLength(), SetDisplayMode(), SetPalette(), SetRomBitmapL(), SetScanLine(), SetSizeInTwips(), SetSizeInTwips(), SizeInPixels(), SizeInTwips(), StoreL(), StoreL(), SwapWidthAndHeight(), UnlockHeap(), UnlockHeap(), VerticalPixelsToTwips(), VerticalTwipsToPixels(), ~CFbsBitmap()

Inherited from CBase:
Delete(), Extension_(), operator new()

See also:


Construction and destruction


~CFbsBitmap()

IMPORT_C ~CFbsBitmap();

Description

Destructor. Calls Reset().

See also:

[Top]


Member functions


Reset()

IMPORT_C void Reset();

Description

Releases the bitmap's handle from the font and bitmap server and decrements its access count. The server-side bitmap is only deleted when the access count for the bitmap decrements to zero.


ScanLineLength()

static IMPORT_C TInt ScanLineLength(TInt aLength, TDisplayMode aDispMode);

Description

Gets the physical length in bytes of a scanline in memory. This is aligned to a 4 byte (DWORD) boundary for performance reasons.

Parameters

TInt aLength

The length of a scanline in pixels.

TDisplayMode aDispMode

The display mode of the bitmap.

Return value

TInt

Number of bytes in the scanline in memory.


DisplayMode()

IMPORT_C TDisplayMode DisplayMode() const;

Description

Gets the display mode of the bitmap.

Return value

TDisplayMode

The display mode of the bitmap.


InitialDisplayMode()

IMPORT_C TDisplayMode InitialDisplayMode() const;

Description

Returns the display mode that was used to create the bitmap.

Return value

TDisplayMode

The display mode used to create the bitmap.


SetDisplayMode()

IMPORT_C TInt SetDisplayMode(TDisplayMode aDisplayMode);

Description

Changes the display mode of the bitmap. The requested display mode cannot be greater (in bpp value) than the initial display mode. This method cannot leave, for instance because of an out of memory condition. No additional memory is allocated or leaving methods called. The bitmap's content is preserved when converting it to the requested display mode, but there may be some loss of quality.

Parameters

TDisplayMode aDisplayMode

The requested display mode.

Return value

TInt

KErrArgument if the requested mode is invalid, or has a greater bpp value than the initial mode. KErrNotSupported if the bitmap is compressed, or is a ROM bitmap or a hardware bitmap. KErrGeneral if the bitmap handle is NULL. KErrNone if the method call is successful.

See also:


Create()

IMPORT_C TInt Create(const TSize &aSizeInPixels, TDisplayMode aDispMode);

Description

Creates a bitmap with the specified size and display mode. The bitmap is created on the font and bitmap server's shared heap.

Parameters

const TSize &aSizeInPixels

The size of the bitmap to be created.

TDisplayMode aDispMode

The display mode of the bitmap to be created.

Return value

TInt

KErrNone if successful; KErrCouldNotConnect if no connection to the font and bitmap server could be made; KErrArgument if either the width or height specified in aSizeInPixels are negative or if the requested display mode is invalid; KErrTooBig if the requested size is too big.


Duplicate()

IMPORT_C TInt Duplicate(TInt aHandle);

Description

Duplicates a bitmap. This function does not create a copy of the bitmap. It just assigns another handle to the bitmap in the font and bitmap server, and sets this object's handle to that. If the specified bitmap is in the ROM, it just assigns a pointer to it.

Parameters

TInt aHandle

The handle to an existing bitmap.

Return value

TInt

KErrNone if successful; KErrCouldNotConnect if no connection to the font and bitmap server could be made; KErrUnknown if no bitmap could be found with the specified handle number.

See also:


IsRomBitmap()

IMPORT_C TBool IsRomBitmap() const;

Description

Tests whether or not the bitmap is in ROM.

Return value

TBool

ETrue if the bitmap is in ROM, EFalse, otherwise.


SetRomBitmapL()

IMPORT_C void SetRomBitmapL(CBitwiseBitmap *aRomBitmapPointer, TInt &aBitmapSizeInBytes);

Description

Sets the bitmap to use a bitmap image stored in ROM.

Parameters

CBitwiseBitmap *aRomBitmapPointer

Pointer to a bitmap stored in ROM.

TInt &aBitmapSizeInBytes

On return, indicates the size of the bitmap in bytes.

Leave codes

KErrUnknown

aRomBitmapPointer is not in ROM, or has an invalid UID.


Load()

IMPORT_C TInt Load(const TDesC &aFileName, TInt32 aId=0, TBool aShareIfLoaded=ETrue);

Description

Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients.

Parameters

const TDesC &aFileName

The filename of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between font and bitmap server clients.

Return value

TInt

KErrNone if successful, otherwise another of the system error codes.


Load()

IMPORT_C TInt Load(const TDesC &aFileName, TInt32 aId, TBool aShareIfLoaded, TUint aFileOffset);

Description

Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients.

Parameters

const TDesC &aFileName

The filename of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients.

TUint aFileOffset

Bitmap file section offset within the file.

Return value

TInt

KErrNone if successful, otherwise another of the system error codes.


LoadAndCompress()

IMPORT_C TInt LoadAndCompress(const TDesC &aFileName, TInt32 aId=0, TBool aShareIfLoaded=ETrue);

Description

Loads and compresses a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients. If the bitmap is loaded from ROM then compression is not allowed.

Parameters

const TDesC &aFileName

The filename of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


LoadAndCompress()

IMPORT_C TInt LoadAndCompress(const TDesC &aFileName, TInt32 aId, TBool aShareIfLoaded, TUint aFileOffset);

Description

Loads and compresses a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients. If the bitmap is loaded from ROM then compression is not allowed.

Parameters

const TDesC &aFileName

The filename of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients.

TUint aFileOffset

Bitmap file section offset within the file.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Load()

IMPORT_C TInt Load(RFile &aFile, TInt32 aId=0, TBool aShareIfLoaded=ETrue);

Description

Loads a specific bitmap from an opened multi-bitmap file handle. The bitmap may be shared by other font and bitmap server clients.

Parameters

RFile &aFile

The handle of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between font and bitmap server clients.

Return value

TInt

KErrNone if successful, otherwise another of the system error codes.


Load()

IMPORT_C TInt Load(RFile &aFile, TInt32 aId, TBool aShareIfLoaded, TUint aFileOffset);

Description

Loads a specific bitmap from an opened multi-bitmap file handle. The bitmap may be shared by other font and bitmap server clients.

Parameters

RFile &aFile

The handle of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients.

TUint aFileOffset

Bitmap file section offset within the file.

Return value

TInt

KErrNone if successful, otherwise another of the system error codes.


LoadAndCompress()

IMPORT_C TInt LoadAndCompress(RFile &aFile, TInt32 aId=0, TBool aShareIfLoaded=ETrue);

Description

Loads and compresses a specific bitmap from an opened multi-bitmap file handle. The bitmap may be shared by other font and bitmap server clients. If the bitmap is loaded from ROM then compression is not allowed.

Parameters

RFile &aFile

The handle of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


LoadAndCompress()

IMPORT_C TInt LoadAndCompress(RFile &aFile, TInt32 aId, TBool aShareIfLoaded, TUint aFileOffset);

Description

Loads and compresses a specific bitmap from an opened multi-bitmap file handle. The bitmap may be shared by other font and bitmap server clients. If the bitmap is loaded from ROM then compression is not allowed.

Parameters

RFile &aFile

The handle of the multi-bitmap (.mbm) file.

TInt32 aId

The bitmap identifier.

TBool aShareIfLoaded

Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients.

TUint aFileOffset

Bitmap file section offset within the file.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Save()

IMPORT_C TInt Save(const TDesC &aFilename);

Description

Saves the bitmap as a direct file store. The file store overwrites any existing file with the same name.

Parameters

const TDesC &aFilename

The name of the file.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Save()

IMPORT_C TInt Save(RFile &aFile);

Description

Saves the bitmap as a direct file store using an opened file handle. The file store overwrites any existing file with the same name.

Parameters

RFile &aFile

The opened file handle

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


StoreL()

static IMPORT_C void StoreL(const TDesC &aFilename, TInt aNumSources, const TDesC *aSources[], TInt32 aSourceIds[]);

Description

Constructs a multi-bitmap file.

Parameters

const TDesC &aFilename

The name of the multi-bitmap file to be created.

TInt aNumSources

The number of bitmaps to store in the file.

const TDesC *aSources

An array of pointers to bitmaps to be stored.

TInt32 aSourceIds

An array of identifiers for the bitmaps to be stored.


StoreL()

static IMPORT_C void StoreL(RFile &aFile, TInt aNumSources, const TDesC *aSources[], TInt32 aSourceIds[]);

Description

Constructs a multi-bitmap file using an opened file handle.

Parameters

RFile &aFile

The opened file handle of multi-bitmap file

TInt aNumSources

The number of bitmaps to store in the file.

const TDesC *aSources

An array of pointers to bitmaps to be stored.

TInt32 aSourceIds

An array of identifiers for the bitmaps to be stored.


GetScanLine()

IMPORT_C void GetScanLine(TDes8 &aBuf, const TPoint &aPixel, TInt aLength, TDisplayMode aDispMode) const;

Description

Gets the bitmap's scanline for the specified line starting from the specified point. The dither offset of the bitmap is taken to be TPoint(0,0).

Parameters

TDes8 &aBuf

The buffer in which the scanline is returned.

const TPoint &aPixel

The start pixel.

TInt aLength

The number of pixels to get.

TDisplayMode aDispMode

The bitmap's display-mode.


SetScanLine()

IMPORT_C void SetScanLine(TDes8 &aBuf, TInt aY) const;

Description

Sets the bitmap's horizontal scanline at the specified y co-ordinate to the scanline contained in the buffer.

Parameters

TDes8 &aBuf

The new scanline to be written to the bitmap.

TInt aY

The y co-ordinate of the scanline.


GetVerticalScanLine()

IMPORT_C void GetVerticalScanLine(TDes8 &aBuf, TInt aX, TDisplayMode aDispMode) const;

Description

Gets the bitmap's vertical scanline starting at the specified x co-ordinate. Note: The method works for uncompressed bitmaps and compressed bitmaps, but it is much slower if it is called for compressed bitmaps. Note: The dither offset of the bitmap is taken to be TPoint(0,0).

Parameters

TDes8 &aBuf

The buffer in which the vertical scanline is returned.

TInt aX

The x co-ordinate of the vertical scanline.

TDisplayMode aDispMode

Format to be used to write the data to the buffer.


GetVerticalScanLine()

IMPORT_C void GetVerticalScanLine(TDes8 &aBuf, TInt aX, const TPoint &aDitherOffset, TDisplayMode aDispMode) const;

Description

Gets the bitmap's vertical scanline starting at the specified x co-ordinate and using the specified dither offset. Note: The method works for uncompressed bitmaps and compressed bitmaps, but it is much slower if it is called for compressed bitmaps.

Parameters

TDes8 &aBuf

The buffer in which the vertical scanline will be returned.

TInt aX

The x co-ordinate of the vertical scanline to get.

const TPoint &aDitherOffset

The dither offset of the bitmap.

TDisplayMode aDispMode

The bitmap's display-mode.


Handle()

IMPORT_C TInt Handle() const;

Description

Gets the handle number of the bitmap. The returned value can be used to give another thread access to the bitmap.

Return value

TInt

The handle number of the bitmap.

See also:


Header()

IMPORT_C SEpocBitmapHeader Header() const;

Description

Creates a bitmap header. This is used when streaming bitmaps to stores.

Return value

SEpocBitmapHeader

The bitmap header for the bitmap.


HorizontalPixelsToTwips()

IMPORT_C TInt HorizontalPixelsToTwips(TInt aPixels) const;

Description

Converts a horizontal dimension on the graphics device from pixels to twips.

Parameters

TInt aPixels

A horizontal dimension on the graphics device in pixels.

Return value

TInt

A horizontal dimension on the graphics device in twips.


HorizontalTwipsToPixels()

IMPORT_C TInt HorizontalTwipsToPixels(TInt aTwips) const;

Description

Converts a horizontal dimension on the graphics device from twips to pixels.

Parameters

TInt aTwips

A horizontal dimension on the graphics device in twips.

Return value

TInt

A horizontal dimension on the graphics device in pixels.


GetPixel()

IMPORT_C void GetPixel(TRgb &aColor, const TPoint &aPixel) const;

Description

Gets the RGB value of the specified pixel.

Parameters

TRgb &aColor

On return, the RGB value of the specified pixel.

const TPoint &aPixel

The pixel whose colour is to be determined.


Resize()

IMPORT_C TInt Resize(const TSize &aSizeInPixels);

Description

Resets the pixel-size of the bitmap. If the new size is bigger than the old, the original bitmap is still situated at (0,0), but pixels outside the range of the old pixel-size are set to zero.

Parameters

const TSize &aSizeInPixels

The new size of the bitmap.

Return value

TInt

KErrNone if successful; KErrArgument if the new size is illegal; KErrGeneral; if the bitmap has not yet been created; KErrAccessDenied if the bitmap is in the ROM; otherwise another of the system-wide error codes.


SizeInPixels()

IMPORT_C TSize SizeInPixels() const;

Description

Gets the pixel-size of the bitmap.

Return value

TSize

The size of the bitmap, in pixels.


SizeInTwips()

IMPORT_C TSize SizeInTwips() const;

Description

Gets the twip-size of the bitmap.

Return value

TSize

The size of the bitmap, in twips.


SetSizeInTwips()

IMPORT_C void SetSizeInTwips(const MGraphicsDeviceMap *aMap);

Description

Sets the twip-size of the bitmap by converting the bitmaps pixel-size from pixels to twips, using the conversion functions in the specified graphics device map.

Parameters

const MGraphicsDeviceMap *aMap

The graphics device map to be used for providing pixel to twip conversion.


SetSizeInTwips()

IMPORT_C void SetSizeInTwips(const TSize &aSizeInTwips);

Description

Sets the twip-size of the bitmap directly to the specified size.

Parameters

const TSize &aSizeInTwips

The new size of the bitmap, in twips.


ExternalizeL()

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises the bitmap to the specified stream.

Parameters

RWriteStream &aStream

The write stream.


ExternalizeRectangleL()

IMPORT_C void ExternalizeRectangleL(RWriteStream &aStream, const TRect &aRect) const;

Description

Externalises that area of the bitmap contained within a specified rectangular area.

Parameters

RWriteStream &aStream

The write stream

const TRect &aRect

The rectangular area of the bitmap to externalise. The bitmap that is externalized will be of this size.


InternalizeL()

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalises a CFbsBitmap from a stream.

Parameters

RReadStream &aStream

The read stream.


Compress()

IMPORT_C TInt Compress();

Description

Return value

TInt


Compress()

IMPORT_C TInt Compress(TBitmapfileCompressionScheme aScheme);

Description

Compresses bitmap in RAM.

Parameters

TBitmapfileCompressionScheme aScheme

specifies preferred compression type ERLECompression or EPaletteCompression

Return value

TInt


CompressInBackground()

IMPORT_C void CompressInBackground(TRequestStatus &aRequestStatus);

Description

Submits the bitmap for asynchronous background compression.

Parameters

TRequestStatus &aRequestStatus

The request status which will be completed with the appropriate error code after the compression has finished


CompressInBackground()

IMPORT_C TInt CompressInBackground();

Description

Submits the bitmap for asynchronous background compression. No notification will be provided when the compression has completed.

Return value

TInt

KErrNone if the bitmap was successfully submitted to the background compression queue, otherwise another of the system-wide error codes.


CompressInBackground()

IMPORT_C void CompressInBackground(TRequestStatus &aRequestStatus, TBitmapfileCompressionScheme aScheme);

Description

Submits the bitmap for asynchronous background compression.

Parameters

TRequestStatus &aRequestStatus

The request status which will be completed with the appropriate error code after the compression has finished

TBitmapfileCompressionScheme aScheme

Specifies preferred compression type: ERLECompression or EPaletteCompression


CompressInBackground()

IMPORT_C TInt CompressInBackground(TBitmapfileCompressionScheme aScheme);

Description

Submits the bitmap for asynchronous background compression. No notification will be provided when the compression has completed.

Parameters

TBitmapfileCompressionScheme aScheme

Return value

TInt

KErrNone if the bitmap was successfully submitted to the background compression queue, otherwise another of the system-wide error codes.


VerticalPixelsToTwips()

IMPORT_C TInt VerticalPixelsToTwips(TInt aPixels) const;

Description

Converts a vertical dimension on the graphics device from pixels to twips.

Parameters

TInt aPixels

A vertical dimension on the graphics device in pixels.

Return value

TInt

A vertical dimension on the graphics device in twips.


VerticalTwipsToPixels()

IMPORT_C TInt VerticalTwipsToPixels(TInt aTwips) const;

Description

Converts a vertical dimension on the graphics device from twips to pixels.

Parameters

TInt aTwips

A vertical dimension on the graphics device in twips.

Return value

TInt

A vertical dimension on the graphics device in pixels.


IsFileInRom()

static IMPORT_C TBool IsFileInRom(const TDesC &aFilename, TUint32 *&aWord);

Description

Tests whether or not the specified file is in ROM.

Parameters

const TDesC &aFilename

The name of the file.

TUint32 *&aWord

On return, contains the address of the file in ROM.

Return value

TBool

ETrue if the file is in the ROM; EFalse otherwise.


IsFileInRom()

static IMPORT_C TBool IsFileInRom(RFile &aFile, TUint32 *&aWord);

Description

Tests whether or not the specified file is in ROM.

Parameters

RFile &aFile

The file handle

TUint32 *&aWord

On return, contains the address of the file in ROM.

Return value

TBool

ETrue if the file is in the ROM; EFalse otherwise.


IsMonochrome()

IMPORT_C TBool IsMonochrome() const;

Description

Tests whether or not the bitmap is monochrome. Monochrome bitmaps have a display-mode of 1 bit-per-pixel.

Return value

TBool

ETrue if the bitmap is monochrome; EFalse otherwise.


IsLargeBitmap()

IMPORT_C TBool IsLargeBitmap() const;

Description

Tests whether the bitmap is large. A bitmap is defined to be large if its size is greater than a threshold which is currently set at 16Kb.

Return value

TBool

ETrue if the bitmap is large, EFalse if not.


PaletteAttributes()

IMPORT_C void PaletteAttributes(TBool &aModifiable, TInt &aNumEntries) const;

Description

Gets the attributes of the bitmap's palette. This is not currently supported.

Parameters

TBool &aModifiable

On return, whether or not the palette is modifiable.

TInt &aNumEntries

On return, the number of entries in the palette.


SetPalette()

IMPORT_C void SetPalette(CPalette *aPalette);

Description

Sets the bitmap's palette. This is not currently supported.

Parameters

CPalette *aPalette

Not used.


GetPalette()

IMPORT_C TInt GetPalette(CPalette *&aPalette) const;

Description

Gets the bitmap's palette. This is not currently supported.

Parameters

CPalette *&aPalette

Not used.

Return value

TInt

KErrNotSupported.


DataAddress()

IMPORT_C TUint32 *DataAddress() const;

Description

Gets the address of the first pixel in the bitmap. The first pixel is at the top-left. Note: Performing a Resize() or Compress() operation changes the value returned by this function.

Return value

TUint32 *

The address of the first pixel of the bitmap.


CreateHardwareBitmap()

IMPORT_C TInt CreateHardwareBitmap(const TSize &aSizeInPixels, TDisplayMode aDispMode, TUid aCreatorUid);

Description

Creates a hardware bitmap with a size and display mode.

Parameters

const TSize &aSizeInPixels

The bitmap's width and height in pixels.

TDisplayMode aDispMode

The bitmap's display mode.

TUid aCreatorUid

The UID of the application calling this function. This is used to allow segregation of the memory used for hardware bitmaps. For instance, if a device has video memory attached to display and graphics accelerator hardware, this UID is used to determine whether any video memory is pre-allocated for that application's use.

Return value

TInt

KErrNone if successful, otherwise one of the system wide error codes. These include KErrCouldNotConnect if no connection has been made to the font and bitmap server, KErrArgument if either the width or height specified in aSizeInPixels are negative or if the requested display mode is invalid, or KErrNotSupported if hardware bitmaps are not supported on the device.


HardwareBitmapHandle()

IMPORT_C TInt HardwareBitmapHandle() const;

Description

Returns the handle for the hardware bitmap which this CFbsBitmap is using.

Return value

TInt

The handle to the hardware bitmap. The handle is NULL if it is not a hardware bitmap.


LockHeap()

IMPORT_C void LockHeap(TBool aAlways=EFalse) const;

Description

Locks the global bitmap heap. This function is deprecated, since it is no longer necessary to protect the value returned by CFbsBitmap::DataAddress(), which now can only change as a result of bitmap operations explicitly requested by clients of the Font and Bitmap Server. Calls to LockHeap() must be coupled with subsequent calls to CFbsBitmap::UnlockHeap(). Code called between a LockHeap() - UnlockHeap() pair must not include any other calls to CFbsBitmap methods, which internally may call CFbsBitmap::LockHeap(). Also, code must not leave between a LockHeap() - UnlockHeap() pair.

Note: IMPORTANT: CFbsBitmap::LockHeap() cannot be used as a means of synchronization between threads concurrently accessing bitmap data.

Parameters

TBool aAlways

See also:


UnlockHeap()

IMPORT_C void UnlockHeap(TBool aAlways=EFalse) const;

Description

Unlocks the global heap. Calls to UnlockHeap() must correspond to prior calls to LockHeap() or LockHeapLC(). This function is deprecated. See CFbsBitmap::LockHeap() for more details.

Parameters

TBool aAlways

See also:


LockHeapLC()

IMPORT_C void LockHeapLC(TBool aAlways=EFalse) const;

Description

Locks the global bitmap heap, leaving on the clean-up stack a pointer to a TCleanupItem that unlocks the heap on deletion. Use this function instead of LockHeap() if code may leave between the LockHeap() - UnlockHeap() pair. Calls to LockHeapLC() must be coupled with subsequent calls to CFbsBitmap::UnlockHeap() or CleanupStack::PopAndDestroy(). This function is deprecated. See CFbsBitmap::LockHeap() for more details.

Parameters

TBool aAlways

See also:


UnlockHeap()

static IMPORT_C void UnlockHeap(TAny *aFbsBitmap);

Description

Parameters

TAny *aFbsBitmap


IsCompressedInRAM()

IMPORT_C TBool IsCompressedInRAM() const;

Description

Tests whether the bitmap located in RAM has been compressed.

Return value

TBool

ETrue if the bitmap is compressed, EFalse otherwise.


SwapWidthAndHeight()

IMPORT_C TInt SwapWidthAndHeight();

Description

Swaps the bitmap's width and height. For example, if the bitmap's size is (40, 20), the new size will be (20, 40). Bitmap content is not preserved.

Return value

TInt

KErrNone if the call was successful, KErrGeneral if the bitmap handle is invalid, KErrAccessDenied if the bitmap is in ROM, KErrNotSupported if it is a hardware bitmap.


GetScanLine()

protected: IMPORT_C void GetScanLine(TDes8 &aBuf, const TPoint &aPixel, TInt aLength, const TPoint &aDitherOffset, TDisplayMode aDispMode) const;

Description

Gets the bitmap's scanline for the specified line starting from the specified point and using the specified dither offset.

Parameters

TDes8 &aBuf

The buffer in which the scanline is returned.

const TPoint &aPixel

The start pixel.

TInt aLength

The number of pixels to get.

const TPoint &aDitherOffset

The dither offset of the bitmap.

TDisplayMode aDispMode

The bitmap's display-mode.


CleanAddress()

protected: IMPORT_C CBitwiseBitmap *CleanAddress() const;

Description

Return value

CBitwiseBitmap *


CleanAddress()

protected: inline CBitwiseBitmap *CleanAddress(TUint32 *&aDataAddress) const;

Description

Parameters

TUint32 *&aDataAddress

Return value

CBitwiseBitmap *