Location:
GDI.H
class CBitmapDevice : public CGraphicsDevice;
Defines an abstract interface for the capabilities and attributes of a bitmapped graphics device.
The class specialises the graphics device interface CGraphicsDevice
for bitmaps graphics. The Window Server Client-Side API provides one implementation of the interface, CWsScreenDevice, for
screen drawing. Another implementation, CFbsBitmapDevice, is used for drawing to in-memory bitmaps. A third, CFbsScreenDevice,
is used (rarely) to access the screen directly, without the mediation of the window server.
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
CBitmapDevice
- Defines an abstract interface for the capabilities and attributes of a bitmapped graphics device
Defined in CBitmapDevice
:
AddFile()
, CreateBitmapContext()
, FontHeightInPixels()
, GetNearestFontInPixels()
, GetNearestFontToDesignHeightInPixels()
, GetNearestFontToMaxHeightInPixels()
, GetPixel()
, GetScanLine()
, RemoveFile()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CGraphicsDevice
:
CreateContext()
,
DisplayMode()
,
FontHeightInTwips()
,
GetPalette()
,
NumTypefaces()
,
PaletteAttributes()
,
SetPalette()
,
SizeInPixels()
,
SizeInTwips()
,
TypefaceSupport()
Inherited from MGraphicsDeviceMap
:
GetNearestFontInTwips()
,
GetNearestFontToDesignHeightInTwips()
,
GetNearestFontToMaxHeightInTwips()
,
HorizontalPixelsToTwips()
,
HorizontalTwipsToPixels()
,
PixelsToTwips()
,
ReleaseFont()
,
TwipsToPixels()
,
VerticalPixelsToTwips()
,
VerticalTwipsToPixels()
virtual void GetPixel(TRgb &aColor, const TPoint &aPixel) const=0;
Gets the RGB colour of an individual pixel on a bitmapped graphics device.
This pure virtual function is implemented in derived classes.
|
virtual void GetScanLine(TDes8 &aBuf, const TPoint &aStartPixel, TInt aLength, TDisplayMode aDispMode) const=0;
Copies a scanline into a buffer.
The pixels are converted from the display mode format on the bitmapped graphics device to the format of the specified device display mode.
By specifying the start pixel and the number of pixels, either the whole or a portion of a bitmapped graphics device pixel row may be copied.
This pure virtual function is implemented in derived classes.
|
virtual TInt AddFile(const TDesC &aName, TInt &aId)=0;
Adds a font file to the device's typeface store. The specified font file must be accessible to any process, i.e. not located inside an application's private directory.
This pure virtual function is implemented in derived classes.
|
|
virtual void RemoveFile(TInt aId=0)=0;
Removes a font file from the font store.
This pure virtual function is implemented in derived classes.
|
virtual TInt GetNearestFontInPixels(CFont *&aFont, const TFontSpec &aFontSpec)=0;
Gets the font which is the nearest to the given font specification.
|
|
inline virtual TInt GetNearestFontToDesignHeightInPixels(CFont *&, const TFontSpec &);
Gets the font which is the nearest to the given font specification. Matching to design height gives no guarantees on the actual physical size of the font.
|
|
inline virtual TInt GetNearestFontToMaxHeightInPixels(CFont *&, const TFontSpec &, TInt);
Gets the font which is the nearest to the given font specification. Matching to maximum height returns a font that will fit within the height specified.
|
|
virtual TInt FontHeightInPixels(TInt aTypefaceIndex, TInt aHeightIndex) const=0;
Gets the height, in pixels, of the specified typeface at one of its defined heights.
The typeface is identified by by an index. For a given typeface, there are a discrete number of heights; the specific height is also identified by an index.
The value returned is rounded up or down to the nearest font height in pixels.
This pure virtual function is implemented in derived classes.
|
|
inline TInt CreateBitmapContext(CBitmapContext *&aGC);
Creates a bitmap context for this bitmap device.
|
|