#include <gdi.h>
| class CGraphicsDevice : public CBase, public MGraphicsDeviceMap |
| Public Member Functions | |
|---|---|
| pure virtual TInt | CreateContext(CGraphicsContext *&) |
| pure virtual TDisplayMode | DisplayMode() |
| pure virtual TInt | FontHeightInTwips(TInt, TInt) |
| pure virtual TInt | GetPalette(CPalette *&) |
| pure virtual TInt | NumTypefaces() |
| pure virtual void | PaletteAttributes(TBool &, TInt &) |
| pure virtual void | SetPalette(CPalette *) |
| pure virtual TSize | SizeInPixels() |
| pure virtual TSize | SizeInTwips() |
| pure virtual void | TypefaceSupport(TTypefaceSupport &, TInt) |
Specifies the interface for concrete device classes.
It holds information on the capabilities and attributes of a graphics device. The CBitmapDevice and CPrinterDevice classes are derived from CGraphicsDevice.
See also: CGraphicsDevice CPrinterDevice
| TInt | CreateContext | ( | CGraphicsContext *& | aGC | ) | [pure virtual] |
Creates a graphics context for the device.
| Parameters | |
|---|---|
| aGC | On return, contains a pointer to the created graphics context. |
| TDisplayMode | DisplayMode | ( | ) | const [pure virtual] |
Gets the display mode of the device.
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 | |
|---|---|
| aTypefaceIndex | An index identifying the typeface, in the range: 0 to (NumTypefaces() - 1). |
| 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(). |
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 | |
|---|---|
| aPalette | On return, holds the device's current palette. |
| TInt | NumTypefaces | ( | ) | const [pure virtual] |
Gets the number of typefaces supported by the graphics device.
Gets the palette attributes of the device.
| Parameters | |
|---|---|
| aModifiable | On return, holds information on whether or not the device's palette is modifiable (ETrue) or fixed (EFalse). |
| aNumEntries | On return, holds the number of entries in the device's palette. |
| void | SetPalette | ( | CPalette * | aPalette | ) | [pure 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 | |
|---|---|
| aPalette | The new palette for the device. |
| TSize | SizeInPixels | ( | ) | const [pure virtual] |
Gets the size of the device area in pixels.
| TSize | SizeInTwips | ( | ) | const [pure virtual] |
Gets the size of the device area in twips.
| void | TypefaceSupport | ( | TTypefaceSupport & | aTypefaceSupport, |
| TInt | aTypefaceIndex | |||
| ) | const [pure 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
See also: NumTypefaces()
| Parameters | |
|---|---|
| aTypefaceSupport | On return, contains the typeface information. |
| aTypefaceIndex | A typeface index number, in the range: zero to (NumTypefaces() - 1). |