class CFbsBitmapDevice : public CFbsDevice |
A graphics device to which a bitmap managed by the font and bitmap server can be drawn.
The class specialises the bitmap graphics device interface CBitmapDevice for drawing to in-memory bitmaps.
Public Member Functions | |
---|---|
~CFbsBitmapDevice () | |
IMPORT_C void | DrawingBegin ( TBool ) |
IMPORT_C void | DrawingEnd ( TBool ) |
IMPORT_C TInt | GetPalette ( CPalette *&) |
IMPORT_C void | GetPixel ( TRgb &, const TPoint &) |
IMPORT_C void | GetScanLine ( TDes8 &, const TPoint &, TInt , TDisplayMode ) |
IMPORT_C TInt | HorizontalPixelsToTwips ( TInt ) |
IMPORT_C TInt | HorizontalTwipsToPixels ( TInt ) |
IMPORT_C CFbsBitmapDevice * | NewL ( CFbsBitmap *) |
IMPORT_C CFbsBitmapDevice * | NewL ( CFbsBitmap *, const TDesC &) |
IMPORT_C void | PaletteAttributes ( TBool &, TInt &) |
IMPORT_C TInt | Resize (const TSize &) |
IMPORT_C void | SetPalette ( CPalette *) |
IMPORT_C TSize | SizeInTwips () |
IMPORT_C TInt | SwapWidthAndHeight () |
IMPORT_C TInt | VerticalPixelsToTwips ( TInt ) |
IMPORT_C TInt | VerticalTwipsToPixels ( TInt ) |
Private Member Functions | |
---|---|
CFbsBitmapDevice () | |
void | ConstructL ( CFbsBitmap *) |
void | ConstructL ( CFbsBitmap *, const TDesC &) |
void | SetBits () |
Private Attributes | |
---|---|
CFbsBitGcBitmap * | iFbsBmp |
IMPORT_C | ~CFbsBitmapDevice | ( | ) | [virtual] |
Frees all resources owned by the object prior to its destruction.
void | ConstructL | ( | CFbsBitmap * | aFbsBitmap | ) | [private] |
CFbsBitmap * aFbsBitmap |
void | ConstructL | ( | CFbsBitmap * | aFbsBitmap, |
const TDesC & | aLibname | |||
) | [private] |
CFbsBitmap * aFbsBitmap | |
const TDesC & aLibname |
IMPORT_C void | DrawingBegin | ( | TBool | aAlways = EFalse | ) | [virtual] |
This method is called when you are about to start direct drawing to the bitmap memory. Calls to DrawingBegin() must be paired with a subsequent call to DrawingEnd() . Also, code must not leave between a DrawingBegin() - DrawingEnd() pair. CFbsBitmapDevice::DrawingEnd()
TBool aAlways = EFalse | Not used. |
IMPORT_C void | DrawingEnd | ( | TBool | aAlways = EFalse | ) | [virtual] |
This method is called when you have finished direct drawing to the bitmap memory. Calls to DrawingEnd() must correspond to a prior call to DrawingBegin() . CFbsBitmapDevice::DrawingBegin()
TBool aAlways = EFalse | Not used. |
IMPORT_C TInt | GetPalette | ( | CPalette *& | aPalette | ) | const [virtual] |
Gets the device's current palette.
This function is only supported if the device has a modifiable palette, which can be determined by calling PaletteAttributes() .
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::GetPalette() .
CPalette *& aPalette |
IMPORT_C void | GetPixel | ( | TRgb & | aColor, |
const TPoint & | aPixel | |||
) | const [virtual] |
Gets the RGB colour of an individual pixel on a bitmapped graphics device.
The function provides a concrete implementation of the pure virtual function CBitmapDevice::GetPixel() .
IMPORT_C void | GetScanLine | ( | TDes8 & | aBuf, |
const TPoint & | aStartPixel, | |||
TInt | aLength, | |||
TDisplayMode | iDispMode | |||
) | const [virtual] |
Copies a scanline into a buffer.
The function provides a concrete implementation of the pure virtual function CBitmapDevice::GetScanLine() .
TDes8 & aBuf | |
const TPoint & aStartPixel | |
TInt aLength | |
TDisplayMode iDispMode |
IMPORT_C TInt | HorizontalPixelsToTwips | ( | TInt | aPixels | ) | const [virtual] |
Converts a horizontal dimension of a device in pixels to a horizontal dimension in twips.
The function provides a concrete implementation of the pure virtual function MGraphicsDeviceMap::HorizontalPixelsToTwips() .
TInt aPixels |
IMPORT_C TInt | HorizontalTwipsToPixels | ( | TInt | aTwips | ) | const [virtual] |
Converts a horizontal dimension of a device in twips to a horizontal dimension in pixels.
The function provides a concrete implementation of the pure virtual function MGraphicsDeviceMap::HorizontalTwipsToPixels() .
TInt aTwips |
IMPORT_C CFbsBitmapDevice * | NewL | ( | CFbsBitmap * | aFbsBitmap | ) | [static] |
Allocates and constructs the device with the bitmap. Also creates a 2D graphics accelerator which is owned and used by the device.
CFbsBitmap * aFbsBitmap | A pointer to the font and bitmap server managed bitmap. |
IMPORT_C CFbsBitmapDevice * | NewL | ( | CFbsBitmap * | aFbsBitmap, |
const TDesC & | aLibname | |||
) | [static] |
Constructs the object from the specified Font and Bitmap server managed bitmap.
CFbsBitmap * aFbsBitmap | A pointer to a Font and Bitmap server managed bitmap. |
const TDesC & aLibname | Name of the library to create the low-level CFbsDrawDevice object from. |
IMPORT_C void | PaletteAttributes | ( | TBool & | aModifiable, |
TInt & | aNumEntries | |||
) | const [virtual] |
Gets the palette attributes of the device.
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::PaletteAttributes() .
IMPORT_C TInt | Resize | ( | const TSize & | aSize | ) |
Resizes the device.
const TSize & aSize | The new size in pixels. |
IMPORT_C void | SetPalette | ( | CPalette * | aPalette | ) | [virtual] |
Sets the device's palette to the specified palette.
Setting the palette is only possible if the device has a modifiable palette, which can be determined by calling PaletteAttributes() .
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::SetPalette() .
CPalette * aPalette |
IMPORT_C TInt | SwapWidthAndHeight | ( | ) |
The method swaps bitmap device's width and height. For example: if the size is (40, 20), the swapped size will be (20, 40). The device's content is not preserved. The method leaves CFbsBitmapDevice object in a consistent state - scaling settings will be set with their default values (the scaling is switched off), the device's dither origin will be set to (0,0), scaling origin to (0,0).
Note: If the device was scaled or its dither origin was set with a non-default value, it has to be rescaled again, respectivelly the dither origin has to be set again.
Note: All graphics contexts, already created by the device, should be re-activated calling CFbsBitGc::Activate() .
Note: Do not call SwapWidthAndHeight() between DrawingBegin() and DrawingEnd() calls!
IMPORT_C TInt | VerticalPixelsToTwips | ( | TInt | aPixels | ) | const [virtual] |
Converts a vertical dimension of a device in pixels to a vertical dimension in twips.
The function provides a concrete implementation of the pure virtual function MGraphicsDeviceMap::VerticalPixelsToTwips() .
TInt aPixels |
IMPORT_C TInt | VerticalTwipsToPixels | ( | TInt | aTwips | ) | const [virtual] |
Converts a vertical dimension of a device in twips to a vertical dimension in pixels.
The function provides a concrete implementation of the pure virtual function MGraphicsDeviceMap::VerticalTwipsToPixels() .
TInt aTwips |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.