#include <bitdev.h>
class CFbsBitmapDevice : public CFbsDevice |
Public Member Functions | |
---|---|
virtual | ~CFbsBitmapDevice() |
virtual IMPORT_C void | DrawingBegin(TBool) |
virtual IMPORT_C void | DrawingEnd(TBool) |
virtual IMPORT_C TInt | GetPalette(CPalette *&) |
virtual IMPORT_C void | GetPixel(TRgb &, const TPoint &) |
virtual IMPORT_C void | GetScanLine(TDes8 &, const TPoint &, TInt, TDisplayMode) |
virtual IMPORT_C TInt | HorizontalPixelsToTwips(TInt) |
virtual IMPORT_C TInt | HorizontalTwipsToPixels(TInt) |
IMPORT_C CFbsBitmapDevice * | NewL(CFbsBitmap *) |
IMPORT_C CFbsBitmapDevice * | NewL(CFbsBitmap *, const TDesC &) |
virtual IMPORT_C void | PaletteAttributes(TBool &, TInt &) |
IMPORT_C TInt | Resize(const TSize &) |
virtual IMPORT_C void | SetPalette(CPalette *) |
virtual IMPORT_C TSize | SizeInTwips() |
IMPORT_C TInt | SwapWidthAndHeight() |
virtual IMPORT_C TInt | VerticalPixelsToTwips(TInt) |
virtual IMPORT_C TInt | VerticalTwipsToPixels(TInt) |
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.
IMPORT_C | ~CFbsBitmapDevice | ( | ) | [virtual] |
Frees all resources owned by the object prior to its destruction.
IMPORT_C void | DrawingBegin | ( | TBool | aAlways = EFalse | ) | [virtual] |
Reimplemented from CFbsDevice::DrawingBegin(TBool)
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.
See also: CFbsBitmapDevice::DrawingEnd()
Parameter | Description |
---|---|
aAlways | Not used. |
IMPORT_C void | DrawingEnd | ( | TBool | aAlways = EFalse | ) | [virtual] |
Reimplemented from CFbsDevice::DrawingEnd(TBool)
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().
See also: CFbsBitmapDevice::DrawingBegin()
Parameter | Description |
---|---|
aAlways | Not used. |
Reimplemented from CGraphicsDevice::GetPalette(CPalette *&)const
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().
Reimplemented from CBitmapDevice::GetPixel(TRgb &,const TPoint &)const
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] |
Reimplemented from CBitmapDevice::GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const
Copies a scanline into a buffer.
The function provides a concrete implementation of the pure virtual function CBitmapDevice::GetScanLine().
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().
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().
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.
Parameter | Description |
---|---|
aFbsBitmap | A pointer to the font and bitmap server managed bitmap. |
Returns: A pointer to the newly constructed device.
IMPORT_C CFbsBitmapDevice * | NewL | ( | CFbsBitmap * | aFbsBitmap, |
const TDesC & | aLibname | |||
) | [static] |
Constructs the object from the specified Font and Bitmap server managed bitmap.
Parameter | Description |
---|---|
aFbsBitmap | A pointer to a Font and Bitmap server managed bitmap. |
aLibname | Name of the library to create the low-level CFbsDrawDevice object from. |
Returns: A pointer to the newly constructed graphics device.
Reimplemented from CGraphicsDevice::PaletteAttributes(TBool &,TInt &)const
Gets the palette attributes of the device.
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::PaletteAttributes().
IMPORT_C void | SetPalette | ( | CPalette * | aPalette | ) | [virtual] |
Reimplemented from CGraphicsDevice::SetPalette(CPalette *)
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().
IMPORT_C TSize | SizeInTwips | ( | ) | const [virtual] |
Reimplemented from CGraphicsDevice::SizeInTwips()const
Gets the size of the device, in twips.
Returns: The size of the device.
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!
Returns: KErrNone The call was successfull. KErrAccessDenied ROM bitmap size can't be swapped. KErrNotSupported Hardware bitmap size can't be swapped. KErrGeneral iDrawDevice or iFbsBmp is NULL.
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().
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().