|
||
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.
MGraphicsDeviceMap
- Interface class for mapping between twips and device-specific units (pixels).
CBase
-
Base class for all classes to be instantiated on the heap.
CGraphicsDevice
- Specifies the interface for concrete device classes.
CBitmapDevice
- Defines an abstract interface for the capabilities and attributes of a bitmapped...
CFbsDevice
- Abstract base class for graphics devices to which bitmaps and fonts can be drawn...
CFbsBitmapDevice
- A graphics device to which a bitmap managed by the font and bitmap server can be...
Defined in CFbsBitmapDevice
:
DrawingBegin(TBool)
This method is called when you are about to start direct drawing to the bitmap m...DrawingEnd(TBool)
This method is called when you have finished direct drawing to the bitmap memory...GetPalette(CPalette *&)const
Gets the device's current palette.GetPixel(TRgb &,const TPoint &)const
Gets the RGB colour of an individual pixel on a bitmapped graphics device.GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const
Copies a scanline into a buffer.HorizontalPixelsToTwips(TInt)const
Converts a horizontal dimension of a device in pixels to a horizontal dimension ...HorizontalTwipsToPixels(TInt)const
Converts a horizontal dimension of a device in twips to a horizontal dimension i...NewL(CFbsBitmap *)
Allocates and constructs the device with the bitmap. Also creates a 2D graphics ...NewL(CFbsBitmap *,const TDesC &)
Constructs the object from the specified Font and Bitmap server managed bitmap.PaletteAttributes(TBool &,TInt &)const
Gets the palette attributes of the device.Resize(const TSize &)
Resizes the device.SetBits()
Sets the bit level.SetPalette(CPalette *)
Sets the device's palette to the specified palette.SizeInTwips()const
Gets the size of the device, in twips.SwapWidthAndHeight()
The method swaps bitmap device's width and height. For example: if the size is (...VerticalPixelsToTwips(TInt)const
Converts a vertical dimension of a device in pixels to a vertical dimension in t...VerticalTwipsToPixels(TInt)const
Converts a vertical dimension of a device in twips to a vertical dimension in pi...~CFbsBitmapDevice()
Frees all resources owned by the object prior to its destruction. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from CBitmapDevice
:
CreateBitmapContext(CBitmapContext *&)
Creates a bitmap context for this bitmap device.Inherited from CFbsDevice
:
AddFile(const TDesC &,TInt &)
Adds a font file to the device's typeface store. The specified font file must be...CancelSprite()const
Cancels drawing the sprite.CreateContext(CFbsBitGc *&)
Creates a font and bitmap server graphics context for the device and activates i...CreateContext(CGraphicsContext *&)
Creates a font and bitmap server graphics context for the device and activates i...DisplayMode()const
Gets the device's display mode.DisplayMode16M()
Depending on the current graphics hardware this will return one of the 16M video...FontHeightInPixels(TInt,TInt)const
Gets the height, in pixels, of the specified typeface at one of its defined heig...FontHeightInTwips(TInt,TInt)const
Gets the height of a font in twips.GetDrawRect(TRect &)const
Gets logical coordinates of the drawing rectangle. If the device is not scaled, ...GetFontById(CFbsFont *&,TUid,const TAlgStyle &)
Gets a specific bitmap font, identified by its UID, from the device's typeface s...GetFontById(CFont *&,TUid,const TAlgStyle &)
Gets a specific bitmap font, identified by its UID, from the device's typeface s...GetNearestFontInPixels(CFbsFont *&,const TFontSpec &)
Creates a client-side FBSERV font from those available in the device's typeface ...GetNearestFontInPixels(CFont *&,const TFontSpec &)
Creates a client-side font from those available in the device's typeface store t...GetNearestFontInTwips(CFbsFont *&,const TFontSpec &)
Creates a client-side FBSERV font from those available in the device's typeface ...GetNearestFontInTwips(CFont *&,const TFontSpec &)
Provides access to a client-side font object in the device's typeface store that...GetNearestFontToDesignHeightInPixels(CFbsFont *&,const TFontSpec &)
Creates a client-side FBSERV font from those available in the device's typeface ...GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Creates a client-side font from those available in the device's typeface store t...GetNearestFontToDesignHeightInTwips(CFbsFont *&,const TFontSpec &)
Creates a client-side FBSERV font from those available in the device's typeface ...GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Creates a client-side font from those available in the device's typeface store t...GetNearestFontToMaxHeightInPixels(CFbsFont *&,const TFontSpec &,TInt)
Creates a client-side FBSERV font from those available in the device's typeface ...GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Creates a client-side font from those available in the device's typeface store t...GetNearestFontToMaxHeightInTwips(CFbsFont *&,const TFontSpec &,TInt)
Creates a client-side FBSERV font from those available in the device's typeface ...GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Creates a client-side font from those available in the device's typeface store t...GraphicsAccelerator()const
Gets a pointer to the 2D graphics accelerator owned by the device. If one is ava...HideSprite()const
Hides the sprite over the whole screen. HideSprite(const TRect &,const TRegion *)const
Hides the sprite within a particular region. NumTypefaces()const
Gets the number of typefaces supported by the device.Orientation()const
Gets the device's orientation. The orientation can be set using CFbsBitGc::SetOr...RectCompare(const TRect &,const CFbsDevice &,const TRect &)const
Compares two rectangles, including their contents.ReleaseFont(CFont *)
Marks the specified font as no longer needed by the user of the device.RemoveFile(TInt)
Removes the specified font file from the device's typeface store. If the default...SetCustomPalette(const CPalette *)
Sets the variable 8 bits per pixel colour palette, replacing the system default ...SetScalingFactor(const TPoint &,TInt,TInt,TInt,TInt)
Sets scaling factor by which the drawing device should scale the drawing images....ShowSprite(TSpriteBase *)const
Shows the specified sprite over the whole screen. ShowSprite(TSpriteBase *,const TRect &,const TRegion *)const
Shows the specified sprite within a particular region. SizeInPixels()const
Gets the size of the device, in pixels.TypefaceSupport(TTypefaceSupport &,TInt)const
Gets information about an indexed typeface.iBitBltMaskedBuffer
iDrawDevice
iFbs
iGraphicsAccelerator
iOrientation
iScreenDevice
iSpare
iTypefaceStore
Inherited from MGraphicsDeviceMap
:
PixelsToTwips(const TPoint &)const
Converts a point in pixels to a point in twips.PixelsToTwips(const TRect &)const
Converts a rectangle in pixels to a rectangle in twips.TwipsToPixels(const TPoint &)const
Converts a point in twips to a point in pixels.TwipsToPixels(const TRect &)const
Converts a rectangle in twips to a rectangle in pixels.IMPORT_C static CFbsBitmapDevice* NewL(CFbsBitmap *aFbsBitmap);
Allocates and constructs the device with the bitmap. Also creates a 2D graphics accelerator which is owned and used by the device.
|
|
|
|
IMPORT_C static CFbsBitmapDevice* NewL(CFbsBitmap *aFbsBitmap, const TDesC &aLibname);
Constructs the object from the specified Font and Bitmap server managed bitmap.
|
|
IMPORT_C virtual ~CFbsBitmapDevice();
Frees all resources owned by the object prior to its destruction.
IMPORT_C TInt Resize(const TSize &aSize);
Resizes the device.
|
|
IMPORT_C virtual void GetScanLine(TDes8 &aBuf, const TPoint &aStartPixel, TInt aLength, TDisplayMode iDispMode) const;
Copies a scanline into a buffer.
The function provides a concrete implementation of the pure virtual function CBitmapDevice::GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const
.
|
IMPORT_C virtual void GetPixel(TRgb &aColor, const TPoint &aPixel) 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(TRgb &,const TPoint &)const
.
|
IMPORT_C virtual TInt HorizontalPixelsToTwips(TInt aPixels) const;
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)const
.
|
|
IMPORT_C virtual TInt VerticalPixelsToTwips(TInt aPixels) const;
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)const
.
|
|
IMPORT_C virtual TInt HorizontalTwipsToPixels(TInt aTwips) const;
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)const
.
|
|
IMPORT_C virtual TInt VerticalTwipsToPixels(TInt aTwips) const;
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)const
.
|
|
IMPORT_C virtual TSize SizeInTwips() const;
Gets the size of the device, in twips.
|
IMPORT_C virtual void PaletteAttributes(TBool &aModifiable, TInt &aNumEntries) const;
Gets the palette attributes of the device.
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::PaletteAttributes(TBool &,TInt &)const
.
|
IMPORT_C virtual void SetPalette(CPalette *aPalette);
Sets the device's palette to the specified palette.
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::SetPalette(CPalette *)
.
|
IMPORT_C virtual TInt GetPalette(CPalette *&aPalette) const;
Gets the device's current palette.
The function provides a concrete implementation of the pure virtual function CGraphicsDevice::GetPalette(CPalette *&)const
.
|
|
IMPORT_C virtual void DrawingBegin(TBool aAlways=EFalse);
This method is called when you are about to start direct drawing to the bitmap memory. Calls to CFbsBitmapDevice::DrawingBegin(TBool)
must be paired with a subsequent call to CFbsBitmapDevice::DrawingEnd(TBool)
. Also, code must not leave between a CFbsBitmapDevice::DrawingBegin(TBool)
- CFbsBitmapDevice::DrawingEnd(TBool)
pair.
|
CFbsBitmapDevice::DrawingEnd(TBool)
This method is called when you have finished direct drawing to the bitmap memory...IMPORT_C virtual void DrawingEnd(TBool aAlways=EFalse);
This method is called when you have finished direct drawing to the bitmap memory. Calls to CFbsBitmapDevice::DrawingEnd(TBool)
must correspond to a prior call to CFbsBitmapDevice::DrawingBegin(TBool)
.
|
CFbsBitmapDevice::DrawingBegin(TBool)
This method is called when you are about to start direct drawing to the bitmap m...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(CFbsDevice *)
.
Note: Do not call CFbsBitmapDevice::SwapWidthAndHeight()
between CFbsBitmapDevice::DrawingBegin(TBool)
and CFbsBitmapDevice::DrawingEnd(TBool)
calls!
|
private: virtual void SetBits();
Sets the bit level.