CFbsDevice Class Reference

#include <bitdev.h>

Link against: bitgdi.lib

class CFbsDevice : public CBitmapDevice
Protected Attributes
TUint8 *iBitBltMaskedBuffer
CFbsDrawDevice *iDrawDevice
RFbsSession *iFbs
CGraphicsAccelerator *iGraphicsAccelerator
CFbsBitGc::TGraphicsOrientation iOrientation
TBool iScreenDevice
TInt iSpare
CFbsTypefaceStore *iTypefaceStore
Public Member Functions
~CFbsDevice()
virtual IMPORT_C TIntAddFile(const TDesC &, TInt &)
IMPORT_C TIntCreateContext(CFbsBitGc *&)
virtual TInt CreateContext(CGraphicsContext *&)
virtual IMPORT_C TDisplayModeDisplayMode()
IMPORT_C TDisplayModeDisplayMode16M()
virtual IMPORT_C TIntFontHeightInPixels(TInt, TInt)
virtual IMPORT_C TIntFontHeightInTwips(TInt, TInt)
IMPORT_C voidGetDrawRect(TRect &)
IMPORT_C TIntGetFontById(CFont *&, TUid, const TAlgStyle &)
TInt GetFontById(CFbsFont *&, TUid, const TAlgStyle &)
virtual IMPORT_C TIntGetNearestFontInPixels(CFont *&, const TFontSpec &)
TInt GetNearestFontInPixels(CFbsFont *&, const TFontSpec &)
virtual IMPORT_C TIntGetNearestFontInTwips(CFont *&, const TFontSpec &)
TInt GetNearestFontInTwips(CFbsFont *&, const TFontSpec &)
virtual IMPORT_C TIntGetNearestFontToDesignHeightInPixels(CFont *&, const TFontSpec &)
TInt GetNearestFontToDesignHeightInPixels(CFbsFont *&, const TFontSpec &)
virtual IMPORT_C TIntGetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)
TInt GetNearestFontToDesignHeightInTwips(CFbsFont *&, const TFontSpec &)
virtual IMPORT_C TIntGetNearestFontToMaxHeightInPixels(CFont *&, const TFontSpec &, TInt)
TInt GetNearestFontToMaxHeightInPixels(CFbsFont *&, const TFontSpec &, TInt)
virtual IMPORT_C TIntGetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt)
TInt GetNearestFontToMaxHeightInTwips(CFbsFont *&, const TFontSpec &, TInt)
CGraphicsAccelerator *GraphicsAccelerator()
virtual IMPORT_C TIntNumTypefaces()
CFbsBitGc::TGraphicsOrientation Orientation()
IMPORT_C TBoolRectCompare(const TRect &, const CFbsDevice &, const TRect &)
IMPORT_C TIntRegisterLinkedTypeface(const CLinkedTypefaceSpecification &, TInt &)
virtual IMPORT_C voidReleaseFont(CFont *)
virtual IMPORT_C voidRemoveFile(TInt)
IMPORT_C TIntSetCustomPalette(const CPalette *)
IMPORT_C TIntSetDrawDeviceOffset(const TPoint &)
IMPORT_C TIntSetScalingFactor(const TPoint &, TInt, TInt, TInt, TInt)
virtual IMPORT_C TSizeSizeInPixels()
virtual IMPORT_C voidTypefaceSupport(TTypefaceSupport &, TInt)
Protected Member Functions
CFbsDevice()
virtual voidCancelSprite()
voidDoGetScanLine(TDes8 &, const TPoint &, TInt, TDisplayMode)
virtual voidDrawingBegin(TBool)
voidDrawingBegin(const CFbsBitmap *, TBool)
virtual voidDrawingEnd(TBool)
voidDrawingEnd(const CFbsBitmap *, TBool)
TInt GetNearestFbsFont(CFbsFont *&, const TFontSpec &)
virtual TSpriteBase *HideSprite()
virtual TSpriteBase *HideSprite(const TRect &, const TRegion *)
voidReadLineDiffMode(TInt, TInt, TInt, TAny *, TDisplayMode)
virtual voidSetBits()
TBool SetOrientation(CFbsBitGc::TGraphicsOrientation)
virtual voidShowSprite(TSpriteBase *)
virtual voidShowSprite(TSpriteBase *, const TRect &, const TRegion *)
voidTruncateRect(TRect &)
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 *&)
CBitmapDevice::GetPixel(TRgb &,const TPoint &)const
CBitmapDevice::GetScanLine(TDes8 &,const TPoint &,TInt,TDisplayMode)const
CGraphicsDevice::GetPalette(CPalette *&)const
CGraphicsDevice::PaletteAttributes(TBool &,TInt &)const
CGraphicsDevice::SetPalette(CPalette *)
CGraphicsDevice::SizeInTwips()const
MGraphicsDeviceMap::HorizontalPixelsToTwips(TInt)const
MGraphicsDeviceMap::HorizontalTwipsToPixels(TInt)const
MGraphicsDeviceMap::MGraphicsDeviceMap()
MGraphicsDeviceMap::PixelsToTwips(const TPoint &)const
MGraphicsDeviceMap::PixelsToTwips(const TRect &)const
MGraphicsDeviceMap::TwipsToPixels(const TPoint &)const
MGraphicsDeviceMap::TwipsToPixels(const TRect &)const
MGraphicsDeviceMap::VerticalPixelsToTwips(TInt)const
MGraphicsDeviceMap::VerticalTwipsToPixels(TInt)const
MGraphicsDeviceMap::~MGraphicsDeviceMap()

Detailed Description

Abstract base class for graphics devices to which bitmaps and fonts can be drawn.

The class implements the pure virtual CBitmapDevice functions and additionally provides:

support for creating and enquiring about fonts

comparing two device rectangles

creating a graphics context for the device.

CFbsBitmapDevice and CFbsScreenDevice are derived fom this class.

See also: CFbsBitmapDevice CFbsScreenDevice

Member Attribute Documentation

iBitBltMaskedBuffer

TUint8 *iBitBltMaskedBuffer[protected]

iDrawDevice

CFbsDrawDevice *iDrawDevice[protected]

iFbs

RFbsSession *iFbs[protected]

iGraphicsAccelerator

CGraphicsAccelerator *iGraphicsAccelerator[protected]

iOrientation

CFbsBitGc::TGraphicsOrientation iOrientation[protected]

iScreenDevice

TBool iScreenDevice[protected]

iSpare

TInt iSpare[protected]

iTypefaceStore

CFbsTypefaceStore *iTypefaceStore[protected]

Constructor & Destructor Documentation

CFbsDevice ( )

CFbsDevice()[protected]

~CFbsDevice ( )

IMPORT_C~CFbsDevice()

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

Member Function Documentation

AddFile ( const TDesC &, TInt & )

IMPORT_C TIntAddFile(const TDesC &aName,
TInt &aId
)[virtual]

Adds a font file to the device's typeface store. The specified font file must be accessible to any process, i.e. not located inside an application's private directory.

Parameters
aNameThe name of the font file.
aIdOn return, the UID value of the font file.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

CancelSprite ( )

voidCancelSprite()const [protected, inline, virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect. Deprecated

CreateContext ( CFbsBitGc *& )

IMPORT_C TIntCreateContext(CFbsBitGc *&aGc)

Creates a font and bitmap server graphics context for the device and activates it.

It is the responsibility of the caller to delete the graphics context when it is no longer needed.

Parameters
aGcOn return, contains a pointer to the graphics context.
Return Value
KErrNone if successful, otherwise, another one of the system-wide error codes.

CreateContext ( CGraphicsContext *& )

TInt CreateContext(CGraphicsContext *&aGc)[inline, virtual]

Creates a font and bitmap server graphics context for the device and activates it.

It is the responsibility of the caller to delete the graphics context when it is no longer needed.

Parameters
aGcOn return, contains a pointer to the graphics context.
Return Value
KErrNone if successful, otherwise, another one of the system-wide error codes.

DisplayMode ( )

IMPORT_C TDisplayModeDisplayMode()const [virtual]

Gets the device's display mode.

Return Value
The display mode of the device.

DisplayMode16M ( )

IMPORT_C TDisplayModeDisplayMode16M()[static]

Depending on the current graphics hardware this will return one of the 16M video modes defined in TDisplayMode, or ENone if a 16M video mode is not supported.

See also: TDisplayMode

Return Value
a 16M display mode or ENone.

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

voidDoGetScanLine(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TDisplayModeaDispMode
)[protected]

The method gets a scanline and puts the scanline data into aBuf.

Parameters
aBufThe destination buffer. It should be with enough length to collect requested scanline data.
aPixelThe first pixel of the requested scanline data
aLengthThe length in pixels of requested data
aDispModerequested scanline should be converted regarding aDispMode parameter

DrawingBegin ( TBool )

voidDrawingBegin(TBool = EFalse)[protected, inline, virtual]

DrawingBegin ( const CFbsBitmap *, TBool )

voidDrawingBegin(const CFbsBitmap *aBitmap,
TBoolaAlways = EFalse
)[protected]

An overloaded version of DrawingBegin(TBool). Similarly to that method, calls to DrawingBegin(const CFbsBitmap*, TBool) must be paired with a subsequent call to DrawingEnd(const CFbsBitmap*, TBool). Also, code must not leave between a DrawingBegin(const CFbsBitmap*, TBool) - DrawingEnd(const CFbsBitmap*, TBool) pair.

See also: CFbsBitmapDevice::DrawingBegin()

Parameters
aBitmapAn additional parameter compared to the basic overload. aBitmap is a pointer to a CFbsBitmap object to be frozen. If a null pointer is given then the method panics.
aAlwaysNot used.

DrawingEnd ( TBool )

voidDrawingEnd(TBool = EFalse)[protected, inline, virtual]

DrawingEnd ( const CFbsBitmap *, TBool )

voidDrawingEnd(const CFbsBitmap *aBitmap,
TBoolaAlways = EFalse
)[protected]

This must always be called after DrawingBegin(const CFbsBitmap*, TBool). Like DrawingBegin(const CFbsBitmap*, TBool) it will panic in debug builds if passed a null pointer.

See also: CFbsBitmapDevice::DrawingEnd()

Parameters
aBitmapA pointer to a CFbsBitmap object to be unfrozen.
aAlwaysNot used.

FontHeightInPixels ( TInt, TInt )

IMPORT_C TIntFontHeightInPixels(TIntaTypefaceIndex,
TIntaHeightIndex
)const [virtual]

Gets the height, in pixels, of the specified typeface at one of its defined heights.

This is an implementation of CBitMapDevice::FontHeightInPixels().

FontHeightInTwips ( TInt, TInt )

IMPORT_C TIntFontHeightInTwips(TIntaTypefaceIndex,
TIntaHeightIndex
)const [virtual]

Gets the height of a font in twips.

This is an implementation of CGraphicsDevice::FontHeightInTwips().

GetDrawRect ( TRect & )

IMPORT_C voidGetDrawRect(TRect &aRect)const

Gets logical coordinates of the drawing rectangle. If the device is not scaled, logocal coordinates of the drawing rectangle are the same as its physical coordinates.

Parameters
aRectUpon return aRect contains drawing rectangle logical coordinates.

GetFontById ( CFont *&, TUid, const TAlgStyle & )

IMPORT_C TIntGetFontById(CFont *&aFont,
TUidaFileId,
const TAlgStyle &aStyle
)

Gets a specific bitmap font, identified by its UID, from the device's typeface store.

When the font is no longer needed, call ReleaseFont().

Parameters
aFontOn return, set to point to the font.
aFileIdThe UID identifying the bitmap font.
aStyleAlgorithmic style for the font.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

GetFontById ( CFbsFont *&, TUid, const TAlgStyle & )

TInt GetFontById(CFbsFont *&aFont,
TUidaFileId,
const TAlgStyle &aStyle
)[inline]

Gets a specific bitmap font, identified by its UID, from the device's typeface store.

When the font is no longer needed, call ReleaseFont().

Parameters
aFontOn return, set to point to the font.
aFileIdThe UID identifying the bitmap font.
aStyleAlgorithmic style for the font.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

GetNearestFbsFont ( CFbsFont *&, const TFontSpec & )

TInt GetNearestFbsFont(CFbsFont *&aFont,
const TFontSpec &aFontSpec
)[protected]

GetNearestFontInPixels ( CFont *&, const TFontSpec & )

IMPORT_C TIntGetNearestFontInPixels(CFont *&aFont,
const TFontSpec &aFontSpec
)[virtual]

Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

Note that this deprecated function is replaced by the new GetNearestFontToDesignHeightInPixels() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInPixels() function instead. This will guarantee that every character within any given text string will fit within the given amount of pixels, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.

Deprecated

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in pixels.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

GetNearestFontInPixels ( CFbsFont *&, const TFontSpec & )

TInt GetNearestFontInPixels(CFbsFont *&aFont,
const TFontSpec &aFontSpec
)[inline]

Creates a client-side FBSERV font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

This function is replaced by GetNearestFontToDesignHeightInPixels().

Deprecated

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in pixels.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

GetNearestFontInTwips ( CFont *&, const TFontSpec & )

IMPORT_C TIntGetNearestFontInTwips(CFont *&aFont,
const TFontSpec &aFontSpec
)[virtual]

Provides access to a client-side font object in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

Note that this deprecated function is replaced by the new GetNearestFontToDesignHeightInTwips() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInTwips() function instead. This will guarantee that every character within any given text string will fit within the given amount of twips, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.

Deprecated

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in twips.
Return Value
KErrNone if successful; otherwise, another one of the system-wide error codes.

GetNearestFontInTwips ( CFbsFont *&, const TFontSpec & )

TInt GetNearestFontInTwips(CFbsFont *&aFont,
const TFontSpec &aFontSpec
)[inline]

Creates a client-side FBSERV font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

This function is replaced by GetNearestFontToDesignHeightInTwips().

Deprecated

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in twips.
Return Value
KErrNone if successful; otherwise, another one of the system-wide error codes.

GetNearestFontToDesignHeightInPixels ( CFont *&, const TFontSpec & )

IMPORT_C TIntGetNearestFontToDesignHeightInPixels(CFont *&aFont,
const TFontSpec &aFontSpec
)[virtual]

Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

This new function replaces the deprecated GetNearestFontInPixels() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInPixels() function instead. This will guarantee that every character within any given text string will fit within the given amount of pixels, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in pixels.
Return Value
KErrNone if successful; otherwise, another one of the system-wide error codes.

GetNearestFontToDesignHeightInPixels ( CFbsFont *&, const TFontSpec & )

TInt GetNearestFontToDesignHeightInPixels(CFbsFont *&aFont,
const TFontSpec &aFontSpec
)[inline]

Creates a client-side FBSERV font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

This function replaces GetNearestFontInPixels().

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in pixels.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

GetNearestFontToDesignHeightInTwips ( CFont *&, const TFontSpec & )

IMPORT_C TIntGetNearestFontToDesignHeightInTwips(CFont *&aFont,
const TFontSpec &aFontSpec
)[virtual]

Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

This new function replaces the deprecated GetNearestFontInTwips() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInTwips() function instead. This will guarantee that every character within any given text string will fit within the given amount of twips, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in twips.
Return Value
KErrNone if successful; otherwise, another one of the system-wide error codes.

GetNearestFontToDesignHeightInTwips ( CFbsFont *&, const TFontSpec & )

TInt GetNearestFontToDesignHeightInTwips(CFbsFont *&aFont,
const TFontSpec &aFontSpec
)[inline]

Creates a client-side FBSERV font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

This function replaces GetNearestFontInTwips().

Parameters
aFontOn return, points to the font which most closely matches the specified font.
aFontSpecAn absolute font specification. Its iHeight member is interpreted as being in twips.
Return Value
KErrNone if successful; otherwise, another one of the system-wide error codes.

GetNearestFontToMaxHeightInPixels ( CFont *&, const TFontSpec &, TInt )

IMPORT_C TIntGetNearestFontToMaxHeightInPixels(CFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)[virtual]

Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

The font and bitmap server returns a pointer to the nearest matching font from those available. Matches to max height of font - this does its best to return a font that will fit within the maximum height specified (but note that variations due to hinting algorithms may rarely result in this height being exceeded by up to one pixel). Problems can also be encountered with bitmap fonts where the typeface exists but doesn't have a font small enough.

Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.
aMaxHeightThe maximum height in pixels within which the font must fit - this overrides the height specified in aFontSpec. If maximum height is greater than 1024 pixels, the function returns KErrTooBig. And returns KErrArgument if equals to 1 pixel.
Return Value
KErrNone, if successful; otherwise, another of the system-wide error codes.

GetNearestFontToMaxHeightInPixels ( CFbsFont *&, const TFontSpec &, TInt )

TInt GetNearestFontToMaxHeightInPixels(CFbsFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)[inline]

Creates a client-side FBSERV font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

The font and bitmap server returns a pointer to the nearest matching font from those available. Matches to max height of font - this does its best to return a font that will fit within the maximum height specified (but note that variations due to hinting algorithms may rarely result in this height being exceeded by up to one pixel). Problems can also be encountered with bitmap fonts where the typeface exists but doesn't have a font small enough.

Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.
aMaxHeightThe maximum height in pixels within which the font must fit - this overrides the height specified in aFontSpec.
Return Value
KErrNone, if successful; otherwise, another of the system-wide error codes.

GetNearestFontToMaxHeightInTwips ( CFont *&, const TFontSpec &, TInt )

IMPORT_C TIntGetNearestFontToMaxHeightInTwips(CFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)[virtual]

Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

The font and bitmap server returns a pointer to the nearest matching font from those available. Matches to max height of font - this does its best to return a font that will fit within the maximum height specified (but note that variations due to hinting algorithms may rarely result in this height being exceeded by up to one pixel). Problems can also be encountered with bitmap fonts where the typeface exists but doesn't have a font small enough.

Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.
aMaxHeightThe maximum height in twips within which the font must fit - this overrides the height specified in aFontSpec. If maximum height is greater than 1024 pixels, the function returns KErrTooBig. And returns KErrArgument if equals to 1 pixel.
Return Value
KErrNone, if successful; otherwise, another of the system-wide error codes.

GetNearestFontToMaxHeightInTwips ( CFbsFont *&, const TFontSpec &, TInt )

TInt GetNearestFontToMaxHeightInTwips(CFbsFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)[inline]

Creates a client-side FBSERV font from those available in the device's typeface store that most closely matches a font specification.

When the font is no longer needed, call ReleaseFont().

The font and bitmap server returns a pointer to the nearest matching font from those available. Matches to max height of font - this does its best to return a font that will fit within the maximum height specified (but note that variations due to hinting algorithms may rarely result in this height being exceeded by up to one pixel). Problems can also be encountered with bitmap fonts where the typeface exists but doesn't have a font small enough.

Parameters
aFontOn return, the pointer is set to point to the device font which most closely approximates to the required font specification.
aFontSpecAn absolute font specification.
aMaxHeightThe maximum height in twips within which the font must fit - this overrides the height specified in aFontSpec.
Return Value
KErrNone, if successful; otherwise, another of the system-wide error codes.

GraphicsAccelerator ( )

CGraphicsAccelerator *GraphicsAccelerator()const [inline]

Gets a pointer to the 2D graphics accelerator owned by the device. If one is available, it is used to accelerate various CFbsBitGc graphics operations.

See also: CFbsBitmapDevice::NewL()

Return Value
Pointer to the graphics accelerator or NULL if not supported.

HideSprite ( )

TSpriteBase *HideSprite()const [protected, inline, virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect. Deprecated

Return Value
TSpriteBase* NULL.

HideSprite ( const TRect &, const TRegion * )

TSpriteBase *HideSprite(const TRect &,
const TRegion *
)const [protected, inline, virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect. Deprecated

Return Value
TSpriteBase* NULL.

NumTypefaces ( )

IMPORT_C TIntNumTypefaces()const [virtual]

Gets the number of typefaces supported by the device.

Return Value
The number of typefaces supported.

Orientation ( )

CFbsBitGc::TGraphicsOrientation Orientation()const [inline]

Gets the device's orientation. The orientation can be set using CFbsBitGc::SetOrientation().

Return Value
The device's orientation.

ReadLineDiffMode ( TInt, TInt, TInt, TAny *, TDisplayMode )

voidReadLineDiffMode(TInt,
TInt,
TInt,
TAny *,
TDisplayMode
)const [protected]

RectCompare ( const TRect &, const CFbsDevice &, const TRect & )

IMPORT_C TBoolRectCompare(const TRect &aSourceRect,
const CFbsDevice &aDevice,
const TRect &aDeviceRect
)const

Compares two rectangles, including their contents.

This function is intended for use by test code only.

Parameters
aSourceRectThe first rectangle to be compared (in this device).
aDeviceThe font and bitmap server device in which the second rectangle is found.
aDeviceRectThe second rectangle to be compared.
Return Value
ETrue if the rectangles are the same; EFalse otherwise.

RegisterLinkedTypeface ( const CLinkedTypefaceSpecification &, TInt & )

IMPORT_C TIntRegisterLinkedTypeface(const CLinkedTypefaceSpecification &aLinkedTypefaceSpec,
TInt &aId
)
Function to add a CLinkedTypefaceSpecification to the font and bitmap server typeface store.

See also: CLinkedTypefaceSpecification

Return Value
an global error code
Capability
ECapabilityWriteDeviceData

ReleaseFont ( CFont * )

IMPORT_C voidReleaseFont(CFont *aFont)[virtual]

Marks the specified font as no longer needed by the user of the device.

As fonts can be shared between applications, this function does not delete the copy of the font from RAM unless the font is only being used by this device.

Parameters
aFontA pointer to the font to be released.

RemoveFile ( TInt )

IMPORT_C voidRemoveFile(TIntaId = 0)[virtual]

Decrements the reference count of a file which was added using AddFile(), and removes the file from the typeface store if the reference count reaches zero.

If zero is passed as parameter, then an attempt is made to remove all font objects from the device's typeface store provided none of the fonts in the store are currently accessed, otherwise it has no effect.

Parameters
aIdThe UID value of the font file to be removed. The default is 0.

SetBits ( )

voidSetBits()[protected, inline, virtual]

Sets the bit level.

SetCustomPalette ( const CPalette * )

IMPORT_C TIntSetCustomPalette(const CPalette *aPalette)

Sets the variable 8 bits per pixel colour palette, replacing the system default one. Only the entries in the system default palette which have corresponding entries in aPalette are overwritten, i.e. if aPalette contains fewer than 256 colours, some will remain unchanged. If aPalette has more than 256 entries, the additional entries are ignored.

Parameters
aPaletteThe custom palette.
Return Value
KErrNone if successful; otherwise, another of the system-wide error codes.

SetDrawDeviceOffset ( const TPoint & )

IMPORT_C TIntSetDrawDeviceOffset(const TPoint &aOrigin)

Used to set an offset

Parameters
aOriginThe offset to give
Return Value
KErrNone on success, otherwise a system wide error code

SetOrientation ( CFbsBitGc::TGraphicsOrientation )

TBool SetOrientation(CFbsBitGc::TGraphicsOrientationaOrientation)[protected]

SetScalingFactor ( const TPoint &, TInt, TInt, TInt, TInt )

IMPORT_C TIntSetScalingFactor(const TPoint &aOrigin,
TIntaFactorX,
TIntaFactorY,
TIntaDivisorX,
TIntaDivisorY
)

Sets scaling factor by which the drawing device should scale the drawing images. If you want to un-scale the device, call SetScalingFactor() with Origin (0,0), factorX = 1, factorY = 1, divisorX = 1, divisorY = 1.

Note: The existing graphics acceleration interface does not have support for scaling.

Note: All graphics contexts, already created by the scaled device, should be re-activated calling CFbsBitGc::Activate().

Parameters
aOriginSpecifies physical coordinates of the new scaling origin of the drawing device. The drawing device maps the logical point [0, 0] to the "aOrigin" physical point .
aFactorXScaling factor for the X-axis of the screen device.
aFactorYScaling factor for the y-axis of the screen device.
aDivisorXNot used. Should be set to 1.
aDivisorYNot used. Should be set to 1.
Return Value
KErrNone If the method succeeds. KErrNotSupported The drawing device does not have scaling capabilities.

ShowSprite ( TSpriteBase * )

voidShowSprite(TSpriteBase *)const [protected, inline, virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect. Deprecated

ShowSprite ( TSpriteBase *, const TRect &, const TRegion * )

voidShowSprite(TSpriteBase *,
const TRect &,
const TRegion *
)const [protected, inline, virtual]

This method has been deprecated. Sprites are no longer supported in BitGDI. Calling this method has no effect. Deprecated

SizeInPixels ( )

IMPORT_C TSizeSizeInPixels()const [virtual]

Gets the size of the device, in pixels.

Return Value
The width and height of the device, in pixels

TruncateRect ( TRect & )

voidTruncateRect(TRect &aRect)[protected]

TypefaceSupport ( TTypefaceSupport &, TInt )

IMPORT_C voidTypefaceSupport(TTypefaceSupport &aTypefaceSupport,
TIntaTypefaceIndex
)const [virtual]

Gets information about an indexed typeface.

See also: CGraphicsDevice::TypefaceSupport()

Parameters
aTypefaceSupportProvides information about the typeface, including its name and attributes.
aTypefaceIndexThe index of the requested typeface in the device's typeface store; between zero and NumTypefaces() 1 inclusive.