CFbsBitmapDevice Class Reference

#include <bitdev.h>

class CFbsBitmapDevice : public CFbsDevice

Inherits from

Public Member Functions
virtual ~CFbsBitmapDevice()
virtual IMPORT_C voidDrawingBegin(TBool)
virtual IMPORT_C voidDrawingEnd(TBool)
virtual IMPORT_C TIntGetPalette(CPalette *&)
virtual IMPORT_C voidGetPixel(TRgb &, const TPoint &)
virtual IMPORT_C voidGetScanLine(TDes8 &, const TPoint &, TInt, TDisplayMode)
virtual IMPORT_C TIntHorizontalPixelsToTwips(TInt)
virtual IMPORT_C TIntHorizontalTwipsToPixels(TInt)
IMPORT_C CFbsBitmapDevice *NewL(CFbsBitmap *)
IMPORT_C CFbsBitmapDevice *NewL(CFbsBitmap *, const TDesC &)
virtual IMPORT_C voidPaletteAttributes(TBool &, TInt &)
IMPORT_C TIntResize(const TSize &)
virtual IMPORT_C voidSetPalette(CPalette *)
virtual IMPORT_C TSizeSizeInTwips()
IMPORT_C TIntSwapWidthAndHeight()
virtual IMPORT_C TIntVerticalPixelsToTwips(TInt)
virtual IMPORT_C TIntVerticalTwipsToPixels(TInt)
Inherited Attributes
CFbsDevice::iBitBltMaskedBuffer
CFbsDevice::iDrawDevice
CFbsDevice::iFbs
CFbsDevice::iGraphicsAccelerator
CFbsDevice::iOrientation
CFbsDevice::iScreenDevice
CFbsDevice::iSpare
CFbsDevice::iTypefaceStore
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CBitmapDevice::CreateBitmapContext(CBitmapContext *&)
CFbsDevice::AddFile(const TDesC &,TInt &)
CFbsDevice::CFbsDevice()
CFbsDevice::CancelSprite()const
CFbsDevice::CreateContext(CFbsBitGc *&)
CFbsDevice::CreateContext(CGraphicsContext *&)
CFbsDevice::DisplayMode()const
CFbsDevice::DisplayMode16M()
CFbsDevice::DoGetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)
CFbsDevice::DrawingBegin(const CFbsBitmap *,TBool)
CFbsDevice::DrawingEnd(const CFbsBitmap *,TBool)
CFbsDevice::FontHeightInPixels(TInt,TInt)const
CFbsDevice::FontHeightInTwips(TInt,TInt)const
CFbsDevice::GetDrawRect(TRect &)const
CFbsDevice::GetFontById(CFbsFont *&,TUid,const TAlgStyle &)
CFbsDevice::GetFontById(CFont *&,TUid,const TAlgStyle &)
CFbsDevice::GetNearestFbsFont(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInPixels(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInPixels(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInTwips(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontInTwips(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInPixels(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInTwips(CFbsFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
CFbsDevice::GetNearestFontToMaxHeightInPixels(CFbsFont *&,const TFontSpec &,TInt)
CFbsDevice::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
CFbsDevice::GetNearestFontToMaxHeightInTwips(CFbsFont *&,const TFontSpec &,TInt)
CFbsDevice::GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
CFbsDevice::GraphicsAccelerator()const
CFbsDevice::HideSprite()const
CFbsDevice::HideSprite(const TRect &,const TRegion *)const
CFbsDevice::NumTypefaces()const
CFbsDevice::Orientation()const
CFbsDevice::ReadLineDiffMode(TInt,TInt,TInt,TAny *,TDisplayMode)const
CFbsDevice::RectCompare(const TRect &,const CFbsDevice &,const TRect &)const
CFbsDevice::RegisterLinkedTypeface(const CLinkedTypefaceSpecification &,TInt &)
CFbsDevice::ReleaseFont(CFont *)
CFbsDevice::RemoveFile(TInt)
CFbsDevice::SetCustomPalette(const CPalette *)
CFbsDevice::SetDrawDeviceOffset(const TPoint &)
CFbsDevice::SetOrientation(CFbsBitGc::TGraphicsOrientation)
CFbsDevice::SetScalingFactor(const TPoint &,TInt,TInt,TInt,TInt)
CFbsDevice::ShowSprite(TSpriteBase *)const
CFbsDevice::ShowSprite(TSpriteBase *,const TRect &,const TRegion *)const
CFbsDevice::SizeInPixels()const
CFbsDevice::TruncateRect(TRect &)
CFbsDevice::TypefaceSupport(TTypefaceSupport &,TInt)const
CFbsDevice::~CFbsDevice()

Detailed Description

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.

Constructor & Destructor Documentation

~CFbsBitmapDevice ( )

IMPORT_C~CFbsBitmapDevice()[virtual]

Frees all resources owned by the object prior to its destruction.

Member Function Documentation

DrawingBegin ( TBool )

IMPORT_C voidDrawingBegin(TBoolaAlways = 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()

ParameterDescription
aAlwaysNot used.

DrawingEnd ( TBool )

IMPORT_C voidDrawingEnd(TBoolaAlways = 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()

ParameterDescription
aAlwaysNot used.

GetPalette ( CPalette *& )

IMPORT_C TIntGetPalette(CPalette *&aPalette)const [virtual]

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().

GetPixel ( TRgb &, const TPoint & )

IMPORT_C voidGetPixel(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().

GetScanLine ( TDes8 &, const TPoint &, TInt, TDisplayMode )

IMPORT_C voidGetScanLine(TDes8 &aBuf,
const TPoint &aStartPixel,
TIntaLength,
TDisplayModeiDispMode
)const [virtual]

Copies a scanline into a buffer.

The function provides a concrete implementation of the pure virtual function CBitmapDevice::GetScanLine().

HorizontalPixelsToTwips ( TInt )

IMPORT_C TIntHorizontalPixelsToTwips(TIntaPixels)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().

HorizontalTwipsToPixels ( TInt )

IMPORT_C TIntHorizontalTwipsToPixels(TIntaTwips)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().

NewL ( CFbsBitmap * )

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.

leave
KErrArgument The bitmap's handle is zero.
leave
KErrAccessDenied The bitmap is in the ROM.
panic
EBitgdiPanicInvalidBitmap aFbsBitmap is NULL.
ParameterDescription
aFbsBitmapA pointer to the font and bitmap server managed bitmap.

Returns: A pointer to the newly constructed device.

NewL ( CFbsBitmap *, const TDesC & )

IMPORT_C CFbsBitmapDevice *NewL(CFbsBitmap *aFbsBitmap,
const TDesC &aLibname
)[static]

Constructs the object from the specified Font and Bitmap server managed bitmap.

ParameterDescription
aFbsBitmapA pointer to a Font and Bitmap server managed bitmap.
aLibnameName of the library to create the low-level CFbsDrawDevice object from.

Returns: A pointer to the newly constructed graphics device.

PaletteAttributes ( TBool &, TInt & )

IMPORT_C voidPaletteAttributes(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().

Resize ( const TSize & )

IMPORT_C TIntResize(const TSize &aSize)

Resizes the device.

ParameterDescription
aSizeThe new size in pixels.

Returns: KErrNone, if successful; otherwise another of the system-wide error codes.

SetPalette ( CPalette * )

IMPORT_C voidSetPalette(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().

SizeInTwips ( )

IMPORT_C TSizeSizeInTwips()const [virtual]

Gets the size of the device, in twips.

Returns: The size of the device.

SwapWidthAndHeight ( )

IMPORT_C TIntSwapWidthAndHeight()

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.

VerticalPixelsToTwips ( TInt )

IMPORT_C TIntVerticalPixelsToTwips(TIntaPixels)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().

VerticalTwipsToPixels ( TInt )

IMPORT_C TIntVerticalTwipsToPixels(TIntaTwips)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().