#include <FBS.H>
Link against:
fbscli.lib
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 CFbsBitmap::Duplicate(TInt)
.
Derivation
CBase
-
Base class for all classes to be instantiated on the heap.
CFbsBitmap
- Note that this class is not intended for user derivation. A bitmap managed by th...
Members
Defined in CFbsBitmap
:
BeginDataAccess()const
Marks the beginning of direct access to the bitmap data. This function prepares ...
CleanAddress()const
CleanAddress(TUint32 *&)const
Compress()
Compress(TBitmapfileCompressionScheme)
Compresses bitmap in RAM.
CompressInBackground()
Submits the bitmap for asynchronous background compression. No notification will...
CompressInBackground(TBitmapfileCompressionScheme)
Submits the bitmap for asynchronous background compression. No notification will...
CompressInBackground(TRequestStatus &)
Submits the bitmap for asynchronous background compression.
CompressInBackground(TRequestStatus &,TBitmapfileCompressionScheme)
Submits the bitmap for asynchronous background compression.
Create(const TSize &,TDisplayMode)
Creates a bitmap with the specified size and display mode. The bitmap is created...
CreateHardwareBitmap(const TSize &,TDisplayMode,TUid)
Creates a hardware bitmap with a size and display mode.
DataAddress()const
Gets the address of the first pixel in the bitmap. The first pixel is at the top...
DisplayMode()const
Gets the display mode of the bitmap.
Duplicate(TInt)
Duplicates a bitmap. This function does not create a copy of the bitmap. It just...
EndDataAccess(TBool)const
Marks the end of direct access to the bitmap data. Use this function after endin...
ExternalizeL(RWriteStream &)const
Externalises the bitmap to the specified stream.
ExternalizeRectangleL(RWriteStream &,const TRect &)const
Externalises that area of the bitmap contained within a specified rectangular ar...
GetPalette(CPalette *&)const
Gets the bitmap's palette. This is not currently supported.
GetPixel(TRgb &,const TPoint &)const
Gets the RGB value of the specified pixel.
GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const
Gets the bitmap's scanline for the specified line starting from the specified po...
GetScanLine(TDes8 &,const TPoint &,TInt,const TPoint &,TDisplayMode)const
Gets the bitmap's scanline for the specified line starting from the specified po...
GetVerticalScanLine(TDes8 &,TInt,TDisplayMode)const
Gets the bitmap's vertical scanline starting at the specified x co-ordinate. Not...
GetVerticalScanLine(TDes8 &,TInt,const TPoint &,TDisplayMode)const
Gets the bitmap's vertical scanline starting at the specified x co-ordinate and ...
Handle()const
Gets the handle number of the bitmap. The returned value can be used to give ano...
HardwareBitmapHandle()const
Returns the handle for the hardware bitmap which this CFbsBitmap is using.
Header()const
Creates a bitmap header. This is used when streaming bitmaps to stores.
HorizontalPixelsToTwips(TInt)const
Converts a horizontal dimension on the graphics device from pixels to twips.
HorizontalTwipsToPixels(TInt)const
Converts a horizontal dimension on the graphics device from twips to pixels.
InitialDisplayMode()const
Returns the display mode that was used to create the bitmap.
InternalizeL(RReadStream &)
Internalises a CFbsBitmap from a stream.
IsCompressedInRAM()const
Tests whether the bitmap located in RAM has been compressed.
IsFileInRom(RFile &,TUint32 *&)
Tests whether or not the specified file is in ROM.
IsFileInRom(const TDesC &,TUint32 *&)
Tests whether or not the specified file is in ROM.
IsLargeBitmap()const
Tests whether the bitmap is large. A bitmap is defined to be large if its size i...
IsMonochrome()const
Tests whether or not the bitmap is monochrome. Monochrome bitmaps have a display...
IsRomBitmap()const
Tests whether or not the bitmap is in ROM.
Load(RFile &,TInt32,TBool)
Loads a specific bitmap from an opened multi-bitmap file handle. The bitmap may ...
Load(RFile &,TInt32,TBool,TUint)
Loads a specific bitmap from an opened multi-bitmap file handle. The bitmap may ...
Load(const TDesC &,TInt32,TBool)
Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by ot...
Load(const TDesC &,TInt32,TBool,TUint)
Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by ot...
LoadAndCompress(RFile &,TInt32,TBool)
Loads and compresses a specific bitmap from an opened multi-bitmap file handle. ...
LoadAndCompress(RFile &,TInt32,TBool,TUint)
Loads and compresses a specific bitmap from an opened multi-bitmap file handle. ...
LoadAndCompress(const TDesC &,TInt32,TBool)
Loads and compresses a specific bitmap from a multi-bitmap file. The bitmap may ...
LoadAndCompress(const TDesC &,TInt32,TBool,TUint)
Loads and compresses a specific bitmap from a multi-bitmap file. The bitmap may ...
LockHeap(TBool)const
Locks the global bitmap heap. This function is deprecated, since it is no longer...
LockHeapLC(TBool)const
Locks the global bitmap heap, leaving on the clean-up stack a pointer to a TClea...
PaletteAttributes(TBool &,TInt &)const
Gets the attributes of the bitmap's palette. This is not currently supported.
Reset()
Releases the bitmap's handle from the font and bitmap server and decrements its ...
Resize(const TSize &)
Resets the pixel-size of the bitmap. If the new size is bigger than the old, the...
Save(RFile &)
Saves the bitmap as a direct file store using an opened file handle. The file st...
Save(const TDesC &)
Saves the bitmap as a direct file store. The file store overwrites any existing ...
ScanLineLength(TInt,TDisplayMode)
Gets the physical length in bytes of a scanline in memory. This is aligned to a ...
SetDisplayMode(TDisplayMode)
Changes the display mode of the bitmap. The requested display mode cannot be gre...
SetPalette(CPalette *)
Sets the bitmap's palette. This is not currently supported.
SetRomBitmapL(CBitwiseBitmap *,TInt &)
Sets the bitmap to use a bitmap image stored in ROM.
SetScanLine(TDes8 &,TInt)const
Sets the bitmap's horizontal scanline at the specified y co-ordinate to the scan...
SetSizeInTwips(const MGraphicsDeviceMap *)
Sets the twip-size of the bitmap by converting the bitmaps pixel-size from pixel...
SetSizeInTwips(const TSize &)
Sets the twip-size of the bitmap directly to the specified size.
SizeInPixels()const
Gets the pixel-size of the bitmap.
SizeInTwips()const
Gets the twip-size of the bitmap.
StoreL(RFile &,TInt,const TDesC *,TInt32)
Constructs a multi-bitmap file using an opened file handle.
StoreL(const TDesC &,TInt,const TDesC *,TInt32)
Constructs a multi-bitmap file.
SwapWidthAndHeight()
Swaps the bitmap's width and height. For example, if the bitmap's size is (40, 2...
UnlockHeap(TAny *)
UnlockHeap(TBool)const
Unlocks the global heap. This function is deprecated. See CFbsBitmap::LockHeap(T...
VerticalPixelsToTwips(TInt)const
Converts a vertical dimension on the graphics device from pixels to twips.
VerticalTwipsToPixels(TInt)const
Converts a vertical dimension on the graphics device from twips to pixels.
~CFbsBitmap()
Destructor. Calls CFbsBitmap::Reset().
Inherited from CBase
:
See also:
Construction and destruction
IMPORT_C ~CFbsBitmap();
Description
Destructor. Calls CFbsBitmap::Reset()
.
See also:
CFbsBitmap::Reset()
Releases the bitmap's handle from the font and bitmap server and decrements its ...
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(TInt,TDisplayMode)
IMPORT_C static 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.
|
|
IMPORT_C TDisplayMode DisplayMode() const;
Description
Gets the display mode of the bitmap.
Return value
InitialDisplayMode()const
IMPORT_C TDisplayMode InitialDisplayMode() const;
Description
Returns the display mode that was used to create the bitmap.
Return value
SetDisplayMode(TDisplayMode)
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
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(const TSize &,TDisplayMode)
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.
|
|
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:
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(CBitwiseBitmap *,TInt &)
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(const TDesC &,TInt32,TBool)
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 TDesC16 &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(const TDesC &,TInt32,TBool,TUint)
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 TDesC16 &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(const TDesC &,TInt32,TBool)
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 TDesC16 &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(const TDesC &,TInt32,TBool,TUint)
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 TDesC16 &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(RFile &,TInt32,TBool)
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(RFile &,TInt32,TBool,TUint)
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(RFile &,TInt32,TBool)
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(RFile &,TInt32,TBool,TUint)
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.
|
|
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 TDesC16 &aFilename |
The name of the file.
|
|
Return value
TInt
|
KErrNone if successful, otherwise another of the system-wide error codes.
|
|
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(const TDesC &,TInt,const TDesC *,TInt32)
IMPORT_C static void StoreL(const TDesC &aFilename, TInt aNumSources, const TDesC *aSources[], TInt32 aSourceIds[]);
Description
Constructs a multi-bitmap file.
Parameters
const TDesC16 &aFilename |
The name of the multi-bitmap file to be created.
|
TInt aNumSources |
The number of bitmaps to store in the file.
|
const TDesC16 *aSources |
An array of pointers to bitmaps to be stored.
|
TInt32 aSourceIds |
An array of identifiers for the bitmaps to be stored.
|
|
StoreL(RFile &,TInt,const TDesC *,TInt32)
IMPORT_C static 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 TDesC16 *aSources |
An array of pointers to bitmaps to be stored.
|
TInt32 aSourceIds |
An array of identifiers for the bitmaps to be stored.
|
|
GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const
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(TDes8 &,TInt)const
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(TDes8 &,TInt,TDisplayMode)const
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(TDes8 &,TInt,const TPoint &,TDisplayMode)const
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.
|
|
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:
IMPORT_C SEpocBitmapHeader Header() const;
Description
Creates a bitmap header. This is used when streaming bitmaps to stores.
Return value
HorizontalPixelsToTwips(TInt)const
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(TInt)const
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(TRgb &,const TPoint &)const
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.
|
|
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.
|
|
IMPORT_C TSize SizeInPixels() const;
Description
Gets the pixel-size of the bitmap.
Return value
TSize
|
The size of the bitmap, in pixels.
|
|
IMPORT_C TSize SizeInTwips() const;
Description
Gets the twip-size of the bitmap.
Return value
TSize
|
The size of the bitmap, in twips.
|
|
SetSizeInTwips(const MGraphicsDeviceMap *)
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(const TSize &)
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(RWriteStream &)const
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalises the bitmap to the specified stream.
Parameters
ExternalizeRectangleL(RWriteStream &,const TRect &)const
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(RReadStream &)
IMPORT_C void InternalizeL(RReadStream &aStream);
Description
Internalises a CFbsBitmap from a stream.
Parameters
IMPORT_C TInt Compress();
Description
Return value
Compress(TBitmapfileCompressionScheme)
IMPORT_C TInt Compress(TBitmapfileCompressionScheme aScheme);
Description
Compresses bitmap in RAM.
Parameters
Return value
CompressInBackground(TRequestStatus &)
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
|
|
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(TRequestStatus &,TBitmapfileCompressionScheme)
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(TBitmapfileCompressionScheme)
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
Return value
TInt
|
KErrNone if the bitmap was successfully submitted to the background compression queue, otherwise another of the system-wide
error codes.
|
|
VerticalPixelsToTwips(TInt)const
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(TInt)const
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(const TDesC &,TUint32 *&)
IMPORT_C static TBool IsFileInRom(const TDesC &aFilename, TUint32 *&aWord);
Description
Tests whether or not the specified file is in ROM.
Parameters
const TDesC16 &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(RFile &,TUint32 *&)
IMPORT_C static 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.
|
|
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.
|
|
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(TBool &,TInt &)const
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.
|
|
IMPORT_C void SetPalette(CPalette *aPalette);
Description
Sets the bitmap's palette. This is not currently supported.
Parameters
GetPalette(CPalette *&)const
IMPORT_C TInt GetPalette(CPalette *&aPalette) const;
Description
Gets the bitmap's palette. This is not currently supported.
Parameters
Return value
IMPORT_C TUint32* DataAddress() const;
Description
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 CFbsBitmap::BeginDataAccess()const
and CFbsBitmap::EndDataAccess(TBool)const
, otherwise performance may be degraded on certain platforms.
Note: Performing a CFbsBitmap::Resize(const TSize &)
or CFbsBitmap::Compress()
operation changes the value returned by this function.
Return value
TUint32 *
|
The address of the first pixel of the bitmap.
|
|
See also:
CreateHardwareBitmap(const TSize &,TDisplayMode,TUid)
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()const
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.
|
|
IMPORT_C void BeginDataAccess() const;
Description
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 CFbsBitmap::DataAddress()const
, otherwise performance may be degraded on certain platforms. Calls to CFbsBitmap::BeginDataAccess()const
must be coupled with subsequent calls to CFbsBitmap::EndDataAccess(TBool)const
.
See also:
EndDataAccess(TBool)const
IMPORT_C void EndDataAccess(TBool aReadOnly=EFalse) const;
Description
Marks the end of direct access to the bitmap data. Use this function after ending direct access to the bitmap data. Calls
to CFbsBitmap::EndDataAccess(TBool)const
must correspond to prior calls to CFbsBitmap::BeginDataAccess()const
. See CFbsBitmap::BeginDataAccess()const
for more details.
Parameters
See also:
Interface status: |
deprecated |
|
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 lock the global bitmap heap
to prevent the pixel data from being moved in memory asynchronously, as the value returned by CFbsBitmap::DataAddress()const
can now only change as a result of bitmap operations explicitly requested by clients of the Font and Bitmap Server. Calls
to CFbsBitmap::LockHeap(TBool)const
should be replaced by calls to CFbsBitmap::BeginDataAccess()const
.
Calls to CFbsBitmap::LockHeap(TBool)const
must be coupled with subsequent calls to CFbsBitmap::UnlockHeap(TBool)const
. Code called between a CFbsBitmap::LockHeap(TBool)const
- CFbsBitmap::UnlockHeap(TBool)const
pair must not include any other calls to CFbsBitmap methods, which internally may call CFbsBitmap::LockHeap(TBool)const
. Also, code must not leave between a CFbsBitmap::LockHeap(TBool)const
- CFbsBitmap::UnlockHeap(TBool)const
pair.
Note: IMPORTANT: CFbsBitmap::LockHeap(TBool)const
cannot be used as a means of synchronization between threads concurrently accessing bitmap data.
Parameters
See also:
Interface status: |
deprecated |
|
IMPORT_C void UnlockHeap(TBool aAlways=EFalse) const;
Description
Unlocks the global heap. This function is deprecated. See CFbsBitmap::LockHeap(TBool)const
for more details. Calls to CFbsBitmap::UnlockHeap(TBool)const
should be replaced by calls to CFbsBitmap::EndDataAccess(TBool)const
. Calls to CFbsBitmap::UnlockHeap(TBool)const
must correspond to prior calls to CFbsBitmap::LockHeap(TBool)const
or CFbsBitmap::LockHeapLC(TBool)const
.
Parameters
See also:
Interface status: |
deprecated |
|
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 CFbsBitmap::LockHeap(TBool)const
if code may leave between the CFbsBitmap::LockHeap(TBool)const
- CFbsBitmap::UnlockHeap(TBool)const
pair. Calls to CFbsBitmap::LockHeapLC(TBool)const
must be coupled with subsequent calls to CFbsBitmap::UnlockHeap(TBool)const
or CleanupStack::PopAndDestroy()
. This function is deprecated. See CFbsBitmap::LockHeap(TBool)const
for more details.
Parameters
See also:
IMPORT_C static void UnlockHeap(TAny *aFbsBitmap);
Description
Parameters
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.
|
|
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(TDes8 &,const TPoint &,TInt,const TPoint &,TDisplayMode)const
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.
|
|
protected: IMPORT_C CBitwiseBitmap* CleanAddress() const;
Description
Return value
CleanAddress(TUint32 *&)const
protected: inline CBitwiseBitmap* CleanAddress(TUint32 *&aDataAddress) const;
Description
Parameters
Return value