Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: bitdev.h
Link against: bitgdi.lib

Class CFbsBitmapDevice

CFbsBitmapDevice

Support

Supported from 5.0

Description

A Font Bitmap server managed bitmap as a graphics device

Derivation

CBaseBase class for all classes to be instantiated on the heap
CBitmapDeviceDefines an interface for the capabilities and attributes of a bitmapped graphics device
CFbsBitmapDeviceA Font Bitmap server managed bitmap as a graphics device
CFbsDeviceAbstract base class for graphics devices to which bitmaps and fonts can be drawn
CGraphicsDeviceSpecifies the interface for concrete device classes
MGraphicsDeviceMapInterface class for mapping between twips and device-specific units (pixels)

Defined in CFbsBitmapDevice:
DrawingBegin(), DrawingEnd(), GetPalette(), GetPixel(), GetScanLine(), HorizontalPixelsToTwips(), HorizontalTwipsToPixels(), NewL(), PaletteAttributes(), Resize(), SetPalette(), SizeInTwips(), VerticalPixelsToTwips(), VerticalTwipsToPixels(), ~CFbsBitmapDevice()

Inherited from CBase:
operator new()

Inherited from CBitmapDevice:
CreateBitmapContext()

Inherited from CFbsDevice:
AddFile(), CreateContext(), DisplayMode(), FontHeightInPixels(), FontHeightInTwips(), GetFontById(), GetNearestFontInPixels(), GetNearestFontInTwips(), NumTypefaces(), RectCompare(), ReleaseFont(), RemoveFile(), SetCustomPalette(), SizeInPixels(), TypefaceSupport()

Inherited from MGraphicsDeviceMap:
PixelsToTwips(), TwipsToPixels()


Construction and destruction


NewL()

static CFbsBitmapDevice* NewL(CFbsBitmap* aFbsBitmap);

Description

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

Parameters

CFbsBitmap* aFbsBitmap

A pointer to a Font and Bitmap server managed bitmap.

Return value

CFbsBitmapDevice*

A pointer to the newly constructed graphics device.


~CFbsBitmapDevice()

virtual ~CFbsBitmapDevice();

Description

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

[Top]


Sizing the bitmap device


Resize()

TInt Resize(const TSize& aSize);

Description

Resizes the bitmap device to the new specified size.

Parameters

const TSize& aSize

The new size.

Return value

TInt

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


SizeInTwips()

virtual TSize SizeInTwips() const;

Description

Gets the size of the bitmap device, in twips.

Return value

TSize

The size of the bitmap device.

[Top]


Beginning and ending drawing


DrawingBegin()

virtual void DrawingBegin(TBool aAlways);

Description

Starts drawing.

Parameters

TBool aAlways

ETrue, lock the shared heap; EFalse, don't lock the heap.


DrawingEnd()

virtual void DrawingEnd(TBool aAlways);

Description

Ends drawing

Parameters

TBool aAlways

ETrue, lock the shared heap; EFalse, don't lock the heap.

[Top]


Getting pixels and scan lines


GetPixel()

virtual void GetPixel(TRgb& aColor,const TPoint& aPixel) const;

Description

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

See also:


GetScanLine()

virtual void GetScanLine(TDes8& aBuf,const TPoint& aStartPixel,TInt aLength,TDisplayMode iDispMode) const;

Description

Copies a scanline into a buffer.

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

See also:

[Top]


Device twip/pixel conversions


HorizontalPixelsToTwips()

virtual TInt HorizontalPixelsToTwips(TInt aPixels) const=0;

Description

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

See also:


HorizontalTwipsToPixels()

virtual TInt HorizontalTwipsToPixels(TInt aTwips) const;

Description

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

See also:


VerticalTwipsToPixels()

virtual TInt VerticalTwipsToPixels(TInt aTwips) const;

Description

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

See also:


VerticalPixelsToTwips()

virtual TInt VerticalPixelsToTwips(TInt aPixels) const;

Description

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

See also:

[Top]


Palette information


GetPalette()

virtual TInt GetPalette(CPalette*& aPalette) const;

Description

Gets the device's current palette.

The function provides a concrete implementation of the pure virtual function CGraphicsDevice::GetPalette().

See also:


PaletteAttributes()

virtual void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;

Description

Gets the palette attributes of the device.

The function provides a concrete implementation of the pure virtual function CGraphicsDevice::PaletteAttributes().

See also:


SetPalette()

virtual void SetPalette(CPalette* aPalette);

Description

Sets the device's palette to the specified palette.

The function provides a concrete implementation of the pure virtual function CGraphicsDevice::SetPalette().

See also: