Location:
gdi.h
CGraphicsDevice
Supported from 5.0
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.
|
Defined in CGraphicsDevice:
CreateContext(), DisplayMode(), FontHeightInTwips(), GetPalette(), NumTypefaces(), PaletteAttributes(), SetPalette(), SizeInPixels(), SizeInTwips(), TypefaceSupport()
Inherited from CBase:
operator new()
Inherited from MGraphicsDeviceMap:
GetNearestFontInTwips(),
HorizontalPixelsToTwips(),
HorizontalTwipsToPixels(),
PixelsToTwips(),
ReleaseFont(),
TwipsToPixels(),
VerticalPixelsToTwips(),
VerticalTwipsToPixels()
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
|
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.
|
virtual TInt GetPalette(CPalette*& aPalette) const = 0;
Gets the device’s current palette.
|
|