#include <BANDDEV.H>
Link against:
pdrstr.lib
class CBandedDevice : public CGraphicsDevice;
Description
Derivation
MGraphicsDeviceMap
- Interface class for mapping between twips and device-specific units (pixels).
CBase
-
Base class for all classes to be instantiated on the heap.
CBandedDevice
- (No abstract)
Members
Defined in CBandedDevice
:
BandBitmap()const
BandRect()const
BandingDirection()const
CreateContext(CGraphicsContext *&)
Creates a graphics context for the device.
DisplayMode()const
Gets the display mode of the device.
FontHeightInTwips(TInt,TInt)const
Get the height of a font in twips.
FullOriginToBandOrigin(const TPoint &)const
GetNearestFontInTwips(CFont *&,const TFontSpec &)
Creates a font from those available in the printer device's typeface store that ...
GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Creates a font from those available in the printer device's typeface store that ...
GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
This call is defined because it had to be - it appeared as an abstract virtual i...
GetPalette(CPalette *&)const
Gets the device's current palette.
HorizontalPixelsToTwips(TInt)const
Converts a horizontal dimension from pixels to twips.
HorizontalTwipsToPixels(TInt)const
Converts a horizontal dimension from twips to pixels.
NewL(TRect,TSize,TDisplayMode,TBandingDirection,TInt)
NextBand()
NumBands()const
NumTypefaces()const
Gets the number of typefaces supported by the graphics device.
PaletteAttributes(TBool &,TInt &)const
Gets the palette attributes of the device.
ReleaseFont(CFont *)
Releases the specified font.
Reset()
SetPalette(CPalette *)
Sets the device's palette.
SizeInPixels()const
Gets the size of the device area in pixels.
SizeInTwips()const
Gets the size of the device area in twips.
TypefaceSupport(TTypefaceSupport &,TInt)const
Gets typeface information for a specified typeface.
VerticalPixelsToTwips(TInt)const
Converts a vertical dimension from pixels to twips.
VerticalTwipsToPixels(TInt)const
Converts a vertical dimension from twips to pixels.
~CBandedDevice()
Inherited from CBase
:
Inherited from MGraphicsDeviceMap
:
Construction and destruction
IMPORT_C ~CBandedDevice();
Description
NewL(TRect,TSize,TDisplayMode,TBandingDirection,TInt)
IMPORT_C static CBandedDevice* NewL(TRect aRectInPixels, TSize aKPixelSizeInTwips, TDisplayMode aDisplayMode, TBandingDirection
aBandingDirection=EBandingTopToBottom, TInt aScanLinesPerBand=0);
Description
Parameters
Return value
HorizontalTwipsToPixels(TInt)const
IMPORT_C virtual TInt HorizontalTwipsToPixels(TInt aTwips) const;
Description
Converts a horizontal dimension from twips to pixels.
An implementation is supplied by a derived class.
Parameters
TInt aTwips |
A horizontal dimension of a device in twips.
|
|
Return value
TInt
|
A horizontal dimension of a device in pixels.
|
|
VerticalTwipsToPixels(TInt)const
IMPORT_C virtual TInt VerticalTwipsToPixels(TInt aTwips) const;
Description
Converts a vertical dimension from twips to pixels.
An implementation is supplied by a derived class.
Parameters
TInt aTwips |
A vertical dimension of a device in twips.
|
|
Return value
TInt
|
A vertical dimension of a device in pixels.
|
|
HorizontalPixelsToTwips(TInt)const
IMPORT_C virtual TInt HorizontalPixelsToTwips(TInt aPixels) const;
Description
Converts a horizontal dimension from pixels to twips.
An implementation is supplied by a derived class.
Parameters
TInt aPixels |
A horizontal dimension of a device in pixels.
|
|
Return value
TInt
|
A horizontal dimension of a device in twips.
|
|
VerticalPixelsToTwips(TInt)const
IMPORT_C virtual TInt VerticalPixelsToTwips(TInt aPixels) const;
Description
Converts a vertical dimension from pixels to twips.
An implementation is supplied by a derived class.
Parameters
TInt aPixels |
A vertical dimension of a device in pixels.
|
|
Return value
TInt
|
A vertical dimension of a device in twips.
|
|
GetNearestFontInTwips(CFont *&,const TFontSpec &)
Interface status: |
deprecated |
|
IMPORT_C virtual 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 CBandedDevice::ReleaseFont(CFont *)
.
This function is replaced by CBandedDevice::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
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(CFont *&,const TFontSpec &)
IMPORT_C virtual 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 CBandedDevice::ReleaseFont(CFont *)
.
This function replaces CBandedDevice::GetNearestFontInTwips(CFont *&,const TFontSpec &)
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.
|
|
GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
IMPORT_C virtual TInt GetNearestFontToMaxHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight);
Description
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
Return value
IMPORT_C virtual 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.
|
|
IMPORT_C virtual TDisplayMode DisplayMode() const;
Description
Gets the display mode of the device.
Return value
IMPORT_C virtual TSize SizeInPixels() const;
Description
Gets the size of the device area in pixels.
Return value
TSize
|
The width and height of the device area, in pixels
|
|
IMPORT_C virtual TSize SizeInTwips() const;
Description
Gets the size of the device area in twips.
Return value
TSize
|
The width and height of the device area, in twips
|
|
CreateContext(CGraphicsContext *&)
IMPORT_C virtual TInt CreateContext(CGraphicsContext *&aGC);
Description
Creates a graphics context for the device.
Parameters
CGraphicsContext *&aGC |
On return, contains a pointer to the created graphics context.
|
|
Return value
TInt
|
KErrNone, if successful; otherwise, another of the system-wide error codes.
|
|
IMPORT_C virtual TInt NumTypefaces() const;
Description
Gets the number of typefaces supported by the graphics device.
Return value
TInt
|
The number of typefaces supported.
|
|
TypefaceSupport(TTypefaceSupport &,TInt)const
IMPORT_C virtual 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
See also:
FontHeightInTwips(TInt,TInt)const
IMPORT_C virtual 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
Return value
TInt
|
The height of the font, in twips.
|
|
PaletteAttributes(TBool &,TInt &)const
IMPORT_C virtual void PaletteAttributes(TBool &aModifiable, TInt &aNumEntries) const;
Description
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.
|
|
IMPORT_C virtual void SetPalette(CPalette *aPalette);
Description
Sets the device's palette.
Parameters
CPalette *aPalette |
The new palette for the device.
|
|
GetPalette(CPalette *&)const
IMPORT_C virtual TInt GetPalette(CPalette *&aPalette) const;
Description
Gets the device's current palette.
Parameters
CPalette *&aPalette |
On return, holds the device's current palette.
|
|
Return value
TInt
|
KErrNone, if successful; otherwise, another of the system-wide error codes.
|
|
IMPORT_C TInt NumBands() const;
Description
Return value
IMPORT_C TInt NextBand();
Description
Return value
IMPORT_C TRect BandRect() const;
Description
Return value
FullOriginToBandOrigin(const TPoint &)const
IMPORT_C TPoint FullOriginToBandOrigin(const TPoint &aPoint) const;
Description
Parameters
Return value
IMPORT_C void Reset();
Description
inline TBandingDirection BandingDirection() const;
Description
Return value
inline CFbsBitmap* BandBitmap() const;
Description
Return value