|
||
class CGraphicsDevice : public CBase, public MGraphicsDeviceMap;
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.
MGraphicsDeviceMap
- Interface class for mapping between twips and device-specific units (pixels).
CBase
-
Base class for all classes to be instantiated on the heap.
CGraphicsDevice
- Specifies the interface for concrete device classes.
Defined in CGraphicsDevice
:
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.GetPalette(CPalette *&)const
Gets the device's current palette.NumTypefaces()const
Gets the number of typefaces supported by the graphics device.PaletteAttributes(TBool &,TInt &)const
Gets the palette attributes of the device.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.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from MGraphicsDeviceMap
:
GetNearestFontInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.HorizontalPixelsToTwips(TInt)const
Converts a horizontal dimension from pixels to twips.HorizontalTwipsToPixels(TInt)const
Converts a horizontal dimension from twips to pixels.PixelsToTwips(const TPoint &)const
Converts a point in pixels to a point in twips.PixelsToTwips(const TRect &)const
Converts a rectangle in pixels to a rectangle in twips.ReleaseFont(CFont *)
Releases the specified font.TwipsToPixels(const TPoint &)const
Converts a point in twips to a point in pixels.TwipsToPixels(const TRect &)const
Converts a rectangle in twips to a rectangle in pixels.VerticalPixelsToTwips(TInt)const
Converts a vertical dimension from pixels to twips.VerticalTwipsToPixels(TInt)const
Converts a vertical dimension from twips to pixels.CPrinterDevice
Printer graphics device interface.virtual TDisplayMode DisplayMode() const=0;
Gets the display mode of the device.
|
virtual TSize SizeInPixels() const=0;
Gets the size of the device area in pixels.
|
virtual TSize SizeInTwips() const=0;
Gets the size of the device area in twips.
|
virtual TInt CreateContext(CGraphicsContext *&aGC)=0;
Creates a graphics context for the device.
|
|
virtual TInt NumTypefaces() const=0;
Gets the number of typefaces supported by the graphics device.
|
virtual void TypefaceSupport(TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const=0;
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
|
CGraphicsDevice::NumTypefaces()const
Gets the number of typefaces supported by the graphics device.virtual TInt FontHeightInTwips(TInt aTypefaceIndex, TInt aHeightIndex) const=0;
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.
|
|
virtual void PaletteAttributes(TBool &aModifiable, TInt &aNumEntries) const=0;
Gets the palette attributes of the device.
|
virtual void SetPalette(CPalette *aPalette)=0;
Sets the device's palette.
|