Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: pdrstore.h
Link against: pdrstr.lib

Class CFbsDrvDevice

class CFbsDrvDevice : public CPdrDevice;

Description

Derivation

Members

Defined in CFbsDrvDevice:
CFbsDrvDevice(), CreateContext(), CreateControlL(), FontHeightInTwips(), GetNearestFontInTwips(), GetNearestFontToDesignHeightInTwips(), KPixelSizeInTwips(), LoadTypeFaceList(), LoadTypeFaceListL(), NumTypefaces(), ReleaseFont(), Reserved_1(), SetModel(), SetModelL(), TypefaceSupport(), iFbsTypefaceCount, iFbsTypefaceStore, iGenTypefaceFontsList, iGenTypefaceFontsType, iPdrTypefaceCount, ~CFbsDrvDevice()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CPdrDevice:
DisplayMode(), Flags(), GetNearestFontToMaxHeightInTwips(), GetPalette(), HorizontalPixelsToTwips(), HorizontalTwipsToPixels(), Model(), OffsetInPixels(), PaletteAttributes(), PrintablePageInPixels(), SelectPageSpecInTwips(), SetPalette(), SizeInPixels(), SizeInTwips(), VerticalPixelsToTwips(), VerticalTwipsToPixels(), iModel, iModelInfo, iStore, iTypefaceStore

Inherited from CPrinterDevice:
CurrentPageSpecInTwips(), DeleteControl(), ExternalizePropertiesL(), InternalizePropertiesL(), RestorePropertiesL(), StorePropertiesL(), iControl, iCurrentPageSpecInTwips

Inherited from MGraphicsDeviceMap:
PixelsToTwips(), TwipsToPixels()


Construction and destruction


CFbsDrvDevice()

IMPORT_C CFbsDrvDevice();

Description


~CFbsDrvDevice()

IMPORT_C ~CFbsDrvDevice();

Description

[Top]


Member functions


GetNearestFontInTwips()

virtual IMPORT_C TInt GetNearestFontInTwips(CFont *&aFont, const TFontSpec &aFontSpec);

Description

Creates a font from those available in the printer 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()

Parameters

CFont *&aFont

On return, points to the font which most closely matches the specified font.

const TFontSpec &aFontSpec

An absolute font specification. Its iHeight member is interpreted as being in twips.

Return value

TInt

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


GetNearestFontToDesignHeightInTwips()

virtual IMPORT_C TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec);

Description

Creates a font from those available in the printer 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

CFont *&aFont

On return, points to the font which most closely matches the specified font.

const TFontSpec &aFontSpec

An absolute font specification. Its iHeight member is interpreted as being in twips.

Return value

TInt

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


ReleaseFont()

virtual IMPORT_C void ReleaseFont(CFont *aFont);

Description

Releases the specified font.

It is used to indicate that the specified font is no longer needed for use by the device map. As fonts can be shared between applications, this function does not delete the copy of the font from RAM unless the font was only being used by this particular device map.

An implementation is supplied by a derived class.

Parameters

CFont *aFont

A pointer to the font to be released.


NumTypefaces()

virtual IMPORT_C TInt NumTypefaces() const;

Description

Gets the number of typefaces supported by the graphics device.

Return value

TInt

The number of typefaces supported.


TypefaceSupport()

virtual IMPORT_C void TypefaceSupport(TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const;

Description

Gets typeface information for a specified typeface.

This information is returned in aTypefaceSupport, and includes:

the typeface name and typeface attributes

the number of font heights

the maximum and minimum font heights

whether it is a scalable typeface

Parameters

TTypefaceSupport &aTypefaceSupport

On return, contains the typeface information.

TInt aTypefaceIndex

A typeface index number, in the range: zero to (NumTypefaces() - 1).

See also:


FontHeightInTwips()

virtual IMPORT_C TInt FontHeightInTwips(TInt aTypefaceIndex, TInt aHeightIndex) const;

Description

Get the height of a font in twips.

The font is identified by typeface and height.

The value returned is rounded up or down to the nearest font height in twips.

Parameters

TInt aTypefaceIndex

An index identifying the typeface, in the range: 0 to (NumTypefaces() - 1).

TInt aHeightIndex

An index identifying the font height, in the range: 0 to (iNumHeights - 1). Note that iNumHeights is in the TTypefaceSupport object returned by TypefaceSupport().

Return value

TInt

The height of the font, in twips.


CreateContext()

virtual IMPORT_C TInt CreateContext(CGraphicsContext *&aGc);

Description

Creates a graphics context for the device.

Parameters

CGraphicsContext *&aGc

Return value

TInt

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


CreateControlL()

virtual IMPORT_C void CreateControlL(CPrinterPort *aPrinterPort);

Description

Creates a printer control.

The printer control is an instance of a CPrinterControl derived class; it is assigned to this printer device's iControl member.

Note that this function is called by CPrintSetup::StartPrintL().

Parameters

CPrinterPort *aPrinterPort

Pointer to an instance of a printer port.


SetModel()

virtual IMPORT_C TInt SetModel(const TPrinterModelHeader &aModel, CStreamStore &aStore);

Description

Parameters

const TPrinterModelHeader &aModel

CStreamStore &aStore

Return value

TInt


LoadTypeFaceList()

IMPORT_C void LoadTypeFaceList();

Description


KPixelSizeInTwips()

virtual IMPORT_C TSize KPixelSizeInTwips() const;

Description

Return value

TSize


LoadTypeFaceListL()

IMPORT_C void LoadTypeFaceListL();

Description

New Updated LoadTypeFaceList() method


SetModelL()

IMPORT_C TInt SetModelL(const TPrinterModelHeader &aModel, CStreamStore &aStore);

Description

Parameters

const TPrinterModelHeader &aModel

CStreamStore &aStore

Return value

TInt


Reserved_1()

private: virtual IMPORT_C void Reserved_1();

Description

[Top]


Member data


iFbsTypefaceStore

protected: CFbsTypefaceStore * iFbsTypefaceStore;

Description


iGenTypefaceFontsList

protected: CArrayFixFlat< TInt > * iGenTypefaceFontsList;

Description


iGenTypefaceFontsType

protected: CArrayFixFlat< TInt > * iGenTypefaceFontsType;

Description


iFbsTypefaceCount

protected: TInt iFbsTypefaceCount;

Description


iPdrTypefaceCount

protected: TInt iPdrTypefaceCount;

Description