Location:
bitdev.h
Link against: bitgdi.lib
CFbsDevice
Supported from 5.0
Abstract base class for graphics devices to which bitmaps and fonts can be drawn.
Implements the pure virtual CBitmapDevice
functions
and additionally provides:
support for creating and enquiring about fonts
comparing two device rectangles
creating a graphics context for the device.
CFbsBitmapDevice
and CFbsScreenDevice
are
derived fom this class.
|
Defined in CFbsDevice
:
AddFile()
, CreateContext()
, DisplayMode()
, FontHeightInPixels()
, FontHeightInTwips()
, GetFontById()
, GetNearestFontInPixels()
, GetNearestFontInTwips()
, NumTypefaces()
, RectCompare()
, ReleaseFont()
, RemoveFile()
, SetCustomPalette()
, SizeInPixels()
, TypefaceSupport()
, ~CFbsDevice()
Inherited from CBase
:
operator new()
Inherited from CBitmapDevice
:
CreateBitmapContext()
,
GetPixel()
,
GetScanLine()
Inherited from CGraphicsDevice
:
GetPalette()
,
PaletteAttributes()
,
SetPalette()
,
SizeInTwips()
Inherited from MGraphicsDeviceMap
:
HorizontalPixelsToTwips()
,
HorizontalTwipsToPixels()
,
PixelsToTwips()
,
TwipsToPixels()
,
VerticalPixelsToTwips()
,
VerticalTwipsToPixels()
TInt CreateContext(CFbsBitGc*& aGc);
Creates a font and bitmap server (FBSERV) graphics context for the device and activates it.
It is the responsibility of the caller to delete the graphics context when it is no longer needed.
|
|
TBool RectCompare(const TRect& aSourceRect,const CFbsDevice& aDevice,const TRect& aDeviceRect) const;
Compares two rectangles, including their contents.
|
|
TInt GetNearestFontInTwips(CFbsFont*& aFont,const TFontSpec& aFontSpec);
Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.
|
|
ReleaseFont()
.TInt GetNearestFontInPixels(CFbsFont*& aFont,const TFontSpec& aFontSpec);
Creates a client-side font from those available in the device's typeface store that most closely matches a font specification.
|
|
ReleaseFont()
.TInt GetFontById(CFbsFont*& aFont,TUid aFileId,const TAlgStyle& aStyle);
Gets a specific font, identified by its UID, from the device's typeface store.
|
|
ReleaseFont()
.void ReleaseFont(CFont* aFont);
Marks the specified font as no longer needed by the user of the device.
As fonts can be shared between applications, this function does not delete the copy of the font from RAM unless the font is only being used by this device.
|
TInt AddFile(const TDesC& aName,TInt& aId);
Adds a font file to the device's typeface store.
|
|
void RemoveFile(TInt aId=0);
Removes the specified font file from the device's typeface store. If the default value of zero is used, this deletes all font files.
|
TDisplayMode DisplayMode() const;
Gets the device's display mode.
|
TSize SizeInPixels() const;
Gets the size of the device, in pixels.
|
TInt NumTypefaces() const;
Gets the number of typefaces supported by the device.
|
void TypefaceSupport(TTypefaceSupport& aTypefaceSupport,TInt aTypefaceIndex) const;
Gets information about an indexed typeface.
|
TInt FontHeightInPixels(TInt aTypefaceIndex,TInt aHeightIndex) const;
Gets the height in pixels of the indexed typeface at the indexed height.
This is an implementation of
CBitmapDevice::FontHeightInPixels()
.
TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
Gets the height in twips of the indexed typeface at the indexed height.
This is an implementation of
CGraphicsDevice::FontHeightInTwips()
.
TInt SetCustomPalette(const CPalette* aPalette);
Supported from 6.1
Sets the variable 8 bits per pixel colour palette, replacing
the system default one. Only the entries in the system default palette which
have corresponding entries in aPalette
are overwritten, i.e. if
aPalette
contains fewer than 256 colours, some will remain
unchanged. If aPalette
has more than 256 entries, the additional
entries are ignored.
|
|