#include <fbs.h>
class CFbsBitmap : public CBase |
Protected Attributes | |
---|---|
CBitwiseBitmap * | iAddressPointer |
RFbsSession * | iFbs |
TUint16 | iFlags |
TInt | iHandle |
TInt | iServerHandle |
TInt16 | iUseCount |
Protected Member Enumerations | |
---|---|
enum | anonymous { EIsRomBitmap, EIsExtendedBitmap, EIsReadOnlyBitmapMask } |
Protected Member Functions | |
---|---|
CBitwiseBitmap * | Address() |
CBitwiseBitmap * | BeginDataAccessAndGetCleanAddress(TUint32 *&) |
IMPORT_C CBitwiseBitmap * | CleanAddress() |
TInt | DoCreate(const TSize &, TDisplayMode, TUid, TInt) |
void | DoSaveL(RFile &) |
IMPORT_C void | GetScanLine(TDes8 &, const TPoint &, TInt, const TPoint &, TDisplayMode) |
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().
See also: CFbsBitmap::Duplicate()
CBitwiseBitmap * | iAddressPointer | [protected] |
WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.
RFbsSession * | iFbs | [protected] |
WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.
TUint16 | iFlags | [protected] |
WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.
TInt | iHandle | [protected] |
WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.
TInt | iServerHandle | [protected] |
WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.
TInt16 | iUseCount | [protected] |
WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.
IMPORT_C void | BeginDataAccess | ( | ) | const |
Marks the beginning of direct access to the bitmap data. This function prepares the bitmap for direct access to its pixel data and should be used before calling DataAddress(), otherwise performance may be degraded on certain platforms. Calls to BeginDataAccess() must be coupled with subsequent calls to EndDataAccess().
See also: CFbsBitmap::DataAddress() CFbsBitmap::EndDataAccess()
CBitwiseBitmap * | BeginDataAccessAndGetCleanAddress | ( | TUint32 *& | aDataAddress | ) | const [protected, inline] |
IMPORT_C TInt | Compress | ( | TBitmapfileCompressionScheme | aScheme | ) |
Compresses bitmap in RAM.
Parameter | Description |
---|---|
aScheme | specifies preferred compression type ERLECompression or EPaletteCompression |
Returns: KErrNone on success, KErrGeneral if the bitmap handle is NULL, KErrAccessDenied if the bitmap is in ROM or it is an extended bitmap, otherwise one of the system wide error codes.
IMPORT_C void | CompressInBackground | ( | TRequestStatus & | aRequestStatus | ) |
Submits the bitmap for asynchronous background compression.
Parameter | Description |
---|---|
aRequestStatus | The request status which will be completed with the appropriate error code after the compression has finished The error code will be KErrNone on success, KErrGeneral if the bitmap handle is NULL, KErrAccessDenied if the bitmap is in ROM or it is an extended bitmap, otherwise one of the system wide error codes. |
IMPORT_C TInt | CompressInBackground | ( | ) |
Submits the bitmap for asynchronous background compression. No notification will be provided when the compression has completed.
Returns: KErrNone if the bitmap was successfully submitted to the background compression queue, KErrGeneral if the bitmap handle is NULL, KErrAccessDenied if the bitmap is in ROM or it is an extended bitmap, otherwise another of the system-wide error codes.
IMPORT_C void | CompressInBackground | ( | TRequestStatus & | aRequestStatus, |
TBitmapfileCompressionScheme | aScheme | |||
) |
Submits the bitmap for asynchronous background compression.
Parameter | Description |
---|---|
aRequestStatus | The request status which will be completed with the appropriate error code after the compression has finished. The error code will be KErrNone on success, KErrGeneral if the bitmap handle is NULL, KErrAccessDenied if the bitmap is in ROM or it is an extended bitmap, otherwise one of the system wide error codes. |
aScheme | Specifies preferred compression type: ERLECompression or EPaletteCompression |
IMPORT_C TInt | CompressInBackground | ( | TBitmapfileCompressionScheme | aScheme | ) |
Submits the bitmap for asynchronous background compression. No notification will be provided when the compression has completed.
Returns: KErrNone if the bitmap was successfully submitted to the background compression queue, KErrGeneral if the bitmap handle is NULL, KErrAccessDenied if the bitmap is in ROM or it is an extended bitmap, otherwise another of the system-wide error codes.
IMPORT_C TInt | Create | ( | const TSize & | aSizeInPixels, |
TDisplayMode | aDispMode | |||
) |
Creates a bitmap with the specified size and display mode. The bitmap is created on the font and bitmap server's shared heap.
Parameter | Description |
---|---|
aSizeInPixels | The size of the bitmap to be created. |
aDispMode | The display mode of the bitmap to be created. |
Returns: 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.
IMPORT_C TInt | CreateExtendedBitmap | ( | const TSize & | aSizeInPixels, |
TDisplayMode | aDispMode, | |||
TUid | aType, | |||
const TAny * | aData, | |||
TInt | aDataSize | |||
) |
Creates an extended bitmap. Extended bitmaps are used to store immutable data in a platform-specific format. They cannot be used as targets of graphics contexts, and modification of their data via DataAddress() or TBitmapUtil is not supported and results in undefined behaviour up to and including process termination.
Initialisation of the raw data of the new bitmap is carried out by copying the data pointed to by the parameter aData.
Read-only access to the raw data of an extended bitmap is provided by DataAddress() and DataSize() in conjunction with BeginDataAccess() and EndDataAccess().
Extended bitmaps have a conceptual size in pixels and a conceptual display mode for compatibility purposes. The raw data can be independent of these properties.
See also: CFbsBitmap::DataAddress() CFbsBitmap::DataSize() CFbsBitmap::BeginDataAccess() CFbsBitmap::EndDataAccess()
Parameter | Description |
---|---|
aSizeInPixels | The conceptual width and height of the new bitmap in pixels. |
aDispMode | The conceptual display mode of the new bitmap. |
aType | The UID identifying the data format of the new bitmap. Used by the extended bitmap rasterizer to distinguish between different data types. |
aData | A pointer to the raw data to be stored in the new bitmap. |
aDataSize | The size in bytes of the raw data to be stored in the new bitmap. |
Returns: KErrNone if successful; KErrArgument if the width or height specified in aSizeInPixels is negative, aDispMode is an invalid display mode, aData is NULL, aDataSize is negative or zero, or aDataType is a UID reserved for OS use; KErrTooBig if the width or height specified in aSizeInPixels exceeds KMaxTInt/4, or aDataSize exceeds KMaxTInt/2; otherwise another of the system-wide error codes.
IMPORT_C TInt | CreateExtendedBitmap | ( | const TSize & | aSizeInPixels, |
TDisplayMode | aDispMode, | |||
TUid | aType, | |||
TInt | aDataSize, | |||
MFbsExtendedBitmapInitializer & | aInitializer | |||
) |
Creates an extended bitmap. Extended bitmaps are used to store immutable data in a platform-specific format. They cannot be used as targets of graphics contexts, and modification of their data via DataAddress() or TBitmapUtil is not supported and results in undefined behaviour up to and including process termination.
Initialisation of the raw data of the new bitmap is carried out by a callback to the MFbsExtendedBitmapInitializer::InitExtendedBitmap() function passed through the parameter aInitializer.
Read-only access to the raw data of an extended bitmap is provided by DataAddress() and DataSize() in conjunction with BeginDataAccess() and EndDataAccess().
Extended bitmaps have a conceptual size in pixels and a conceptual display mode for compatibility purposes. The raw data can be independent of these properties.
See also: CFbsBitmap::DataAddress() CFbsBitmap::DataSize() CFbsBitmap::BeginDataAccess() CFbsBitmap::EndDataAccess() MFbsExtendedBitmapInitializer
Parameter | Description |
---|---|
aSizeInPixels | The conceptual width and height of the new bitmap in pixels. |
aDispMode | The conceptual display mode of the new bitmap. |
aType | The UID identifying the data format of the new bitmap. Used by the extended bitmap rasterizer to distinguish between different data types. |
aDataSize | The size in bytes of the raw data to be stored in the new bitmap. |
aInitializer | A reference to the initializer of the raw data to be stored in the new bitmap. |
Returns: KErrNone if successful; KErrArgument if the width or height specified in aSizeInPixels is negative, aDispMode is an invalid display mode, aData is NULL, aDataSize is negative or zero, or aDataType is a UID reserved for OS use; KErrTooBig if the width or height specified in aSizeInPixels exceeds KMaxTInt/4, or aDataSize exceeds KMaxTInt/2; otherwise another of the system-wide error codes.
IMPORT_C TInt | CreateHardwareBitmap | ( | const TSize & | aSizeInPixels, |
TDisplayMode | aDispMode, | |||
TUid | aCreatorUid | |||
) |
Creates a hardware bitmap with a size and display mode.
Parameter | Description |
---|---|
aSizeInPixels | The bitmap's width and height in pixels. |
aDispMode | The bitmap's display mode. |
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. |
Returns: 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.
IMPORT_C TUint32 * | DataAddress | ( | ) | const |
Gets the address of the first pixel in the bitmap. The first pixel is at the top-left. Access to the pixel data of a bitmap should be surrounded by calls to BeginDataAccess() and EndDataAccess(), otherwise performance may be degraded on certain platforms.
Note: Performing a Resize() or Compress() operation changes the value returned by this function.
See also: CFbsBitmap::BeginDataAccess() CFbsBitmap::EndDataAccess()
Returns: The address of the first pixel of the bitmap.
IMPORT_C TInt | DataSize | ( | ) | const |
Gets the size in bytes of the bitmap data.
Returns: The size in bytes of the bitmap data.
IMPORT_C TInt | DataStride | ( | ) | const |
Gets the length in bytes between scanlines in memory.
Returns: The length in bytes between scanlines in memory.
IMPORT_C TDisplayMode | DisplayMode | ( | ) | const |
Gets the display mode of the bitmap.
Returns: The display mode of the bitmap.
TInt | DoCreate | ( | const TSize & | aSizeInPixels, |
TDisplayMode | aDispMode, | |||
TUid | aUid, | |||
TInt | aDataSize = 0 | |||
) | [protected] |
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.
See also: CFbsBitmap::Handle()
Parameter | Description |
---|---|
aHandle | The handle to an existing bitmap. |
Returns: 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.
IMPORT_C void | EndDataAccess | ( | TBool | aReadOnly = EFalse | ) | const |
Marks the end of direct access to the bitmap data. Use this function after ending direct access to the bitmap data. Calls to EndDataAccess() must correspond to prior calls to BeginDataAccess(). See BeginDataAccess() for more details.
See also: CFbsBitmap::BeginDataAccess()
Parameter | Description |
---|---|
aReadOnly | True if the bitmap data had only been read. False if the data has been modified. |
IMPORT_C TUid | ExtendedBitmapType | ( | ) | const |
Gets the UID identifying the data format of an extended bitmap.
Returns: The UID identifying the data format of the bitmap or KNullUid if the bitmap is not an extended bitmap.
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises the bitmap to the specified stream. Not supported for extended bitmaps.
Parameter | Description |
---|---|
aStream | The write stream. |
IMPORT_C void | ExternalizeRectangleL | ( | RWriteStream & | aStream, |
const TRect & | aRect | |||
) | const |
Externalises that area of the bitmap contained within a specified rectangular area. Not supported for extended bitmaps.
Parameter | Description |
---|---|
aStream | The write stream |
aRect | The rectangular area of the bitmap to externalise. The bitmap that is externalized will be of this size. |
Parameter | Description |
---|---|
aBitmapIdArray | returns an array of all the bitmap handles |
Returns: KErrNone if successful, KErrOverflow if the bitmapBuffer is not large enough to store all the bitmap handles, otherwise another of the system-wide error codes.
Gets a pointer to the decompression buffer owned by this thread's FBServ session.
Parameter | Description |
---|---|
aSize | The size in bytes of the scan lines to decompress. |
Returns: A pointer to the decompression buffer or NULL if there is no FBServ session.
Parameter | Description |
---|---|
aColor | On return, the RGB value of the specified pixel. |
aPixel | The pixel whose colour is to be determined. |
IMPORT_C void | GetScanLine | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TDisplayMode | aDispMode | |||
) | const |
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).
Parameter | Description |
---|---|
aBuf | The buffer in which the scanline is returned. |
aPixel | The start pixel. |
aLength | The number of pixels to get. |
aDispMode | Format to be used to write the data to the buffer. |
IMPORT_C void | GetScanLine | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
const TPoint & | aDitherOffset, | |||
TDisplayMode | aDispMode | |||
) | const [protected] |
Gets the bitmap's scanline for the specified line starting from the specified point and using the specified dither offset.
Parameter | Description |
---|---|
aBuf | The buffer in which the scanline is returned. |
aPixel | The start pixel. |
aLength | The number of pixels to get. |
aDitherOffset | The dither offset of the bitmap. |
aDispMode | Format to be used to write the data to the buffer. |
IMPORT_C void | GetVerticalScanLine | ( | TDes8 & | aBuf, |
TInt | aX, | |||
TDisplayMode | aDispMode | |||
) | const |
Parameter | Description |
---|---|
aBuf | The buffer in which the vertical scanline is returned. |
aX | The x co-ordinate of the vertical scanline. |
aDispMode | Format to be used to write the data to the buffer. |
IMPORT_C void | GetVerticalScanLine | ( | TDes8 & | aBuf, |
TInt | aX, | |||
const TPoint & | aDitherOffset, | |||
TDisplayMode | aDispMode | |||
) | const |
Parameter | Description |
---|---|
aBuf | The buffer in which the vertical scanline will be returned. |
aX | The x co-ordinate of the vertical scanline to get. |
aDitherOffset | The dither offset of the bitmap. |
aDispMode | Format to be used to write the data to the buffer. |
IMPORT_C TInt | Handle | ( | ) | const |
Gets the handle number of the bitmap. The returned value can be used to give another thread access to the bitmap.
See also: CFbsBitmap::Duplicate()
Returns: The handle number of the bitmap.
IMPORT_C TInt | HardwareBitmapHandle | ( | ) | const |
Returns the handle for the hardware bitmap which this CFbsBitmap is using.
Returns: The handle to the hardware bitmap. The handle is NULL if it is not a hardware bitmap.
IMPORT_C SEpocBitmapHeader | Header | ( | ) | const |
Creates a bitmap header. This is used when streaming bitmaps to stores.
Returns: The bitmap header for the bitmap.
IMPORT_C TDisplayMode | InitialDisplayMode | ( | ) | const |
Returns the display mode that was used to create the bitmap.
Returns: The display mode used to create the bitmap.
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises a CFbsBitmap from a stream.
Parameter | Description |
---|---|
aStream | The read stream. |
IMPORT_C TBool | IsCompressedInRAM | ( | ) | const |
Tests whether the bitmap located in RAM has been compressed.
Returns: ETrue if the bitmap is compressed, EFalse otherwise.
IMPORT_C TBool | IsLargeBitmap | ( | ) | const |
Tests whether the bitmap is large.
Returns: ETrue if the bitmap is large, EFalse if not.
IMPORT_C TBool | IsMonochrome | ( | ) | const |
Tests whether or not the bitmap is monochrome. Monochrome bitmaps have a display-mode of 1 bit-per-pixel.
Returns: ETrue if the bitmap is monochrome; EFalse otherwise.
IMPORT_C TBool | IsRomBitmap | ( | ) | const |
Tests whether or not the bitmap is read-only.
Returns: ETrue if the bitmap is read-only, EFalse otherwise.
IMPORT_C TBool | IsVolatile | ( | ) | const |
Tests whether the bitmap is volatile. A bitmap becomes volatile if CFbsBitmap::DataAdress() is called without CFbsBitmap::BeginDataAccess() having been called before and it can become non-volatile again if a resizing or compression is performed.
Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients.
Parameter | Description |
---|---|
aFileName | The filename of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between font and bitmap server clients. |
Returns: KErrNone if successful, otherwise another of the system error codes.
Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients.
Parameter | Description |
---|---|
aFileName | The filename of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients. |
aFileOffset | Bitmap file section offset within the file. |
Returns: KErrNone if successful, otherwise another of the system error codes.
Loads a specific bitmap from an opened multi-bitmap file handle. The bitmap may be shared by other font and bitmap server clients.
Parameter | Description |
---|---|
aFile | The handle of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between font and bitmap server clients. |
Returns: KErrNone if successful, otherwise another of the system error codes.
Loads a specific bitmap from an opened multi-bitmap file handle. The bitmap may be shared by other font and bitmap server clients.
Parameter | Description |
---|---|
aFile | The handle of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients. |
aFileOffset | Bitmap file section offset within the file. |
Returns: KErrNone if successful, otherwise another of the system error codes.
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.
Parameter | Description |
---|---|
aFileName | The filename of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients. |
Returns: KErrNone if successful, otherwise another of the system-wide error codes.
IMPORT_C TInt | LoadAndCompress | ( | const TDesC & | aFileName, |
TInt32 | aId, | |||
TBool | aShareIfLoaded, | |||
TUint | aFileOffset | |||
) |
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.
Parameter | Description |
---|---|
aFileName | The filename of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients. |
aFileOffset | Bitmap file section offset within the file. |
Returns: KErrNone if successful, otherwise another of the system-wide error codes.
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.
Parameter | Description |
---|---|
aFile | The handle of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients. |
Returns: KErrNone if successful, otherwise another of the system-wide error codes.
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.
Parameter | Description |
---|---|
aFile | The handle of the multi-bitmap (.mbm) file. |
aId | The bitmap identifier. |
aShareIfLoaded | Specifies whether or not the loaded bitmap will be made available for sharing between FBSERV clients. |
aFileOffset | Bitmap file section offset within the file. |
Returns: KErrNone if successful, otherwise another of the system-wide error codes.
IMPORT_C void | LockHeap | ( | TBool | aAlways = EFalse | ) | const |
Locks the global bitmap heap. This function is deprecated, since it is no longer necessary to lock the global bitmap heap to prevent the pixel data from being moved in memory asynchronously, as the value returned by DataAddress() can now only change as a result of bitmap operations explicitly requested by clients of the Font and Bitmap Server. Calls to LockHeap() should be replaced by calls to BeginDataAccess().
IMPORTANT: CFbsBitmap::LockHeap() cannot be used as a means of synchronization between threads concurrently accessing bitmap data.
See also: CFbsBitmap::UnlockHeap() CFbsBitmap::BeginDataAccess()
IMPORT_C void | LockHeapLC | ( | TBool | aAlways = EFalse | ) | const |
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.
See also: CFbsBitmap::LockHeap()
IMPORT_C CFbsRasterizer * | Rasterizer | ( | ) | [static] |
Gets a pointer to the rasterizer for extended bitmaps if present.
Returns: A pointer to the rasterizer owned by this thread's FBServ session. NULL if the rasterizer is not present.
IMPORT_C void | Reset | ( | ) |
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.
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.
Parameter | Description |
---|---|
aSizeInPixels | The new size of the bitmap. |
Returns: 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 ROM or is an extended bitmap; otherwise another of the system-wide error codes.
Saves the bitmap as a direct file store. The file store overwrites any existing file with the same name.
Parameter | Description |
---|---|
aFilename | The name of the file. |
Returns: KErrNone if successful, KErrNotSupported if this CFbsBitmap is an extended bitmap, otherwise another of the system-wide error codes.
Saves the bitmap as a direct file store using an opened file handle. The file store overwrites any existing file with the same name.
Parameter | Description |
---|---|
aFile | The opened file handle |
Returns: KErrNone if successful, KErrNotSupported if this CFbsBitmap is an extended bitmap, otherwise another of the system-wide error codes.
IMPORT_C TInt | ScanLineLength | ( | TInt | aLength, |
TDisplayMode | aDispMode | |||
) | [static] |
Gets the physical length in bytes of a scanline in memory. This is aligned to a 4 byte (DWORD) boundary for performance reasons.
Parameter | Description |
---|---|
aLength | The length of a scanline in pixels. |
aDispMode | The display mode of the bitmap. |
Returns: Number of bytes in the scanline in memory.
IMPORT_C TInt64 | SerialNumber | ( | ) | const |
Returns the serial number of the bitmap The serial number is unique to this bitmap. The serial number is a signed 64-bit integer, with only the positive values being assigned. As ROM bitmaps do not have serial numbers, the serial number will use the negative range of values so that ROM bitmap's serial number cannot be the same as a RAM bitmap's. ROM bitmap's address pointers are unique to the ROM bitmap, so the serial number will just be negative value of the address pointer.
Returns: The unique serial number for the bitmap
IMPORT_C TInt | SetDisplayMode | ( | TDisplayMode | aDisplayMode | ) |
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.
See also: CFbsBitmap::InitialDisplayMode()
Parameter | Description |
---|---|
aDisplayMode | The requested display mode. |
Returns: 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, an extended bitmap or a hardware bitmap. KErrGeneral if the bitmap handle is NULL. KErrNone if the method call is successful.
IMPORT_C void | SetPalette | ( | CPalette * | aPalette | ) |
Sets the bitmap's palette. This is not currently supported.
Parameter | Description |
---|---|
aPalette | Not used. |
IMPORT_C void | SetRomBitmapL | ( | CBitwiseBitmap * | aRomBitmapPointer, |
TInt & | aBitmapSizeInBytes | |||
) |
Parameter | Description |
---|---|
aRomBitmapPointer | Pointer to a bitmap stored in ROM. |
aBitmapSizeInBytes | On return, indicates the size of the bitmap in bytes. |
Parameter | Description |
---|---|
aBuf | The new scanline to be written to the bitmap. |
aY | The y co-ordinate of the scanline. |
IMPORT_C void | SetSizeInTwips | ( | const MGraphicsDeviceMap * | aMap | ) |
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.
Parameter | Description |
---|---|
aMap | The graphics device map to be used for providing pixel to twip conversion. |
IMPORT_C void | SetSizeInTwips | ( | const TSize & | aSizeInTwips | ) |
Sets the twip-size of the bitmap directly to the specified size.
Parameter | Description |
---|---|
aSizeInTwips | The new size of the bitmap, in twips. |
IMPORT_C TSize | SizeInPixels | ( | ) | const |
Gets the pixel-size of the bitmap.
Returns: The size of the bitmap, in pixels.
IMPORT_C TSize | SizeInTwips | ( | ) | const |
Gets the twip-size of the bitmap.
Returns: The size of the bitmap, in twips.
IMPORT_C void | StoreL | ( | const TDesC & | aFilename, |
TInt | aNumSources, | |||
const TDesC * | aSources, | |||
TInt32 | aSourceIds | |||
) | [static] |
Constructs a multi-bitmap file.
Parameter | Description |
---|---|
aFilename | The name of the multi-bitmap file to be created. |
aNumSources | The number of bitmaps to store in the file. |
aSources | An array of pointers to bitmaps to be stored. |
aSourceIds | An array of identifiers for the bitmaps to be stored. |
IMPORT_C void | StoreL | ( | RFile & | aFile, |
TInt | aNumSources, | |||
const TDesC * | aSources, | |||
TInt32 | aSourceIds | |||
) | [static] |
Constructs a multi-bitmap file using an opened file handle.
Parameter | Description |
---|---|
aFile | The opened file handle of multi-bitmap file |
aNumSources | The number of bitmaps to store in the file. |
aSources | An array of pointers to bitmaps to be stored. |
aSourceIds | An array of identifiers for the bitmaps to be stored. |
IMPORT_C TInt | SwapWidthAndHeight | ( | ) |
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.
Returns: KErrNone if the call was successful, KErrGeneral if the bitmap handle is invalid, KErrAccessDenied if the bitmap is in ROM, KErrNotSupported if the bitmap is a hardware bitmap or an extended bitmap.
IMPORT_C TInt | TouchCount | ( | ) | const |
Tests how many times the bitmap has been touched. A bitmap is touched whenever CFbsBitmap::EndDataAccess() is called with the parameter aReadOnly set to EFalse and also whenever a resizing or compression is performed.
Returns: The number of times the bitmap has been touched.
IMPORT_C void | UnlockHeap | ( | TBool | aAlways = EFalse | ) | const |
Unlocks the global heap. This function is deprecated. See LockHeap() for more details. Calls to UnlockHeap() should be replaced by calls to EndDataAccess(). Calls to UnlockHeap() must correspond to prior calls to LockHeap() or LockHeapLC().
See also: CFbsBitmap::LockHeap() CFbsBitmap::EndDataAccess()