CBandedDevice Class Reference

class CBandedDevice : public CGraphicsDevice

Inherits from

Public Member Functions
~CBandedDevice ()
CFbsBitmap * BandBitmap ()
IMPORT_C TRect BandRect ()
TBandingDirection BandingDirection ()
IMPORT_C TInt CreateContext ( CGraphicsContext *&)
IMPORT_C TDisplayMode DisplayMode ()
IMPORT_C TInt FontHeightInTwips ( TInt , TInt )
IMPORT_C TPoint FullOriginToBandOrigin (const TPoint &)
IMPORT_C TInt GetNearestFontInTwips ( CFont *&, const TFontSpec &)
IMPORT_C TInt GetNearestFontToDesignHeightInTwips ( CFont *&, const TFontSpec &)
IMPORT_C TInt GetNearestFontToMaxHeightInTwips ( CFont *&, const TFontSpec &, TInt )
IMPORT_C TInt GetPalette ( CPalette *&)
IMPORT_C TInt HorizontalPixelsToTwips ( TInt )
IMPORT_C TInt HorizontalTwipsToPixels ( TInt )
IMPORT_C CBandedDevice * NewL ( TRect , TSize , TDisplayMode , TBandingDirection , TInt )
IMPORT_C TInt NextBand ()
IMPORT_C TInt NumBands ()
IMPORT_C TInt NumTypefaces ()
IMPORT_C void PaletteAttributes ( TBool &, TInt &)
IMPORT_C void ReleaseFont ( CFont *)
IMPORT_C void Reset ()
IMPORT_C void SetPalette ( CPalette *)
IMPORT_C TSize SizeInPixels ()
IMPORT_C TSize SizeInTwips ()
IMPORT_C void TypefaceSupport ( TTypefaceSupport &, TInt )
IMPORT_C TInt VerticalPixelsToTwips ( TInt )
IMPORT_C TInt VerticalTwipsToPixels ( TInt )
Private Member Functions
CBandedDevice ( TRect , TBandingDirection , TInt )
void ConstructL ( TDisplayMode , TSize )
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()
Private Attributes
CFbsBitmap * iBandBitmap
CFbsBitmapDevice * iBandBitmapDevice
TInt iBandIndex
TBandingDirection iBandingDirection
CFbsBitGc * iClearGc
TRect iFullRectInPixels
TInt iScanLinesPerBand

Constructor & Destructor Documentation

CBandedDevice(TRect, TBandingDirection, TInt)

CBandedDevice ( TRect aRectInPixels,
TBandingDirection aBandingDirection,
TInt aScanLinesPerBand
) [private]

Parameters

TRect aRectInPixels
TBandingDirection aBandingDirection
TInt aScanLinesPerBand

~CBandedDevice()

IMPORT_C ~CBandedDevice ( )

Member Functions Documentation

BandBitmap()

CFbsBitmap * BandBitmap ( ) const [inline]

BandRect()

IMPORT_C TRect BandRect ( ) const

BandingDirection()

TBandingDirection BandingDirection ( ) const [inline]

ConstructL(TDisplayMode, TSize)

void ConstructL ( TDisplayMode aDisplayMode,
TSize aKPixelSizeInTwips
) [private]

Parameters

TDisplayMode aDisplayMode
TSize aKPixelSizeInTwips

CreateContext(CGraphicsContext *&)

IMPORT_C TInt CreateContext ( CGraphicsContext *& aGC ) [virtual]

Creates a graphics context for the device.

Parameters

CGraphicsContext *& aGC On return, contains a pointer to the created graphics context.

DisplayMode()

IMPORT_C TDisplayMode DisplayMode ( ) const [virtual]

Gets the display mode of the device.

FontHeightInTwips(TInt, TInt)

IMPORT_C TInt FontHeightInTwips ( TInt aTypefaceIndex,
TInt aHeightIndex
) const [virtual]

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

FullOriginToBandOrigin(const TPoint &)

IMPORT_C TPoint FullOriginToBandOrigin ( const TPoint & aPoint ) const

Parameters

const TPoint & aPoint

GetNearestFontInTwips(CFont *&, const TFontSpec &)

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

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.

GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)

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

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.

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

IMPORT_C TInt GetNearestFontToMaxHeightInTwips ( CFont *& aFont,
const TFontSpec & aFontSpec,
TInt aMaxHeight
) [virtual]

This call is defined because it had to be - it appeared as an abstract virtual in the base class. But it should never actually get called for this class.

Parameters

CFont *& aFont
const TFontSpec & aFontSpec
TInt aMaxHeight

GetPalette(CPalette *&)

IMPORT_C TInt GetPalette ( CPalette *& aPalette ) const [virtual]

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

Parameters

CPalette *& aPalette On return, holds the device's current palette.

HorizontalPixelsToTwips(TInt)

IMPORT_C TInt HorizontalPixelsToTwips ( TInt aPixels ) const

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

IMPORT_C TInt HorizontalTwipsToPixels ( TInt aTwips ) const

Parameters

TInt aTwips

NewL(TRect, TSize, TDisplayMode, TBandingDirection, TInt)

IMPORT_C CBandedDevice * NewL ( TRect aRectInPixels,
TSize aKPixelSizeInTwips,
TDisplayMode aDisplayMode,
TBandingDirection aBandingDirection = EBandingTopToBottom,
TInt aScanLinesPerBand = 0
) [static]

Parameters

TRect aRectInPixels
TSize aKPixelSizeInTwips
TDisplayMode aDisplayMode
TBandingDirection aBandingDirection = EBandingTopToBottom
TInt aScanLinesPerBand = 0

NextBand()

IMPORT_C TInt NextBand ( )

NumBands()

IMPORT_C TInt NumBands ( ) const

NumTypefaces()

IMPORT_C TInt NumTypefaces ( ) const [virtual]

Gets the number of typefaces supported by the graphics device.

PaletteAttributes(TBool &, TInt &)

IMPORT_C void PaletteAttributes ( TBool & aModifiable,
TInt & aNumEntries
) const [virtual]

Gets the palette attributes of the device.

Parameters

TBool & aModifiable On return, holds information on whether or not the device's palette is modifiable (ETrue) or fixed (EFalse).
TInt & aNumEntries On return, holds the number of entries in the device's palette.

ReleaseFont(CFont *)

IMPORT_C void ReleaseFont ( CFont * aFont )

Parameters

CFont * aFont

Reset()

IMPORT_C void Reset ( )

SetPalette(CPalette *)

IMPORT_C void SetPalette ( CPalette * aPalette ) [virtual]

Sets the device's palette.

Setting the palette is only possible if the device has a modifiable palette, which can be determined by calling PaletteAttributes() .

Parameters

CPalette * aPalette The new palette for the device.

SizeInPixels()

IMPORT_C TSize SizeInPixels ( ) const [virtual]

Gets the size of the device area in pixels.

SizeInTwips()

IMPORT_C TSize SizeInTwips ( ) const [virtual]

Gets the size of the device area in twips.

TypefaceSupport(TTypefaceSupport &, TInt)

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

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

NumTypefaces()

Parameters

TTypefaceSupport & aTypefaceSupport On return, contains the typeface information.
TInt aTypefaceIndex A typeface index number, in the range: zero to (NumTypefaces() - 1).

VerticalPixelsToTwips(TInt)

IMPORT_C TInt VerticalPixelsToTwips ( TInt aPixels ) const

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

IMPORT_C TInt VerticalTwipsToPixels ( TInt aTwips ) const

Parameters

TInt aTwips

Member Data Documentation

CFbsBitmap * iBandBitmap

CFbsBitmap * iBandBitmap [private]

CFbsBitmapDevice * iBandBitmapDevice

CFbsBitmapDevice * iBandBitmapDevice [private]

TInt iBandIndex

TInt iBandIndex [private]

TBandingDirection iBandingDirection

TBandingDirection iBandingDirection [private]

CFbsBitGc * iClearGc

CFbsBitGc * iClearGc [private]

TRect iFullRectInPixels

TRect iFullRectInPixels [private]

TInt iScanLinesPerBand

TInt iScanLinesPerBand [private]