#include <gdi.h>
class MGraphicsDeviceMap |
Public Member Functions | |
---|---|
MGraphicsDeviceMap() | |
virtual | ~MGraphicsDeviceMap() |
pure virtual TInt | GetNearestFontInTwips(CFont *&, const TFontSpec &) |
virtual TInt | GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &) |
virtual TInt | GetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt) |
pure virtual TInt | HorizontalPixelsToTwips(TInt) |
pure virtual TInt | HorizontalTwipsToPixels(TInt) |
IMPORT_C TPoint | PixelsToTwips(const TPoint &) |
IMPORT_C TRect | PixelsToTwips(const TRect &) |
pure virtual void | ReleaseFont(CFont *) |
IMPORT_C TPoint | TwipsToPixels(const TPoint &) |
IMPORT_C TRect | TwipsToPixels(const TRect &) |
pure virtual TInt | VerticalPixelsToTwips(TInt) |
pure virtual TInt | VerticalTwipsToPixels(TInt) |
Interface class for mapping between twips and device-specific units (pixels).
TZoomFactor is derived from MGraphicsDeviceMap.
See also: CGraphicsDevice TZoomFactor
Gets the font which is the nearest to the given font specification.
When the font is no longer needed, call ReleaseFont().
Note that this deprecated function is replaced by the new GetNearestFontToDesignHeightInTwips() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInTwips() function instead. This will guarantee that every character within any given text string will fit within the given amount of twips, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.
DeprecatedUse GetNearestFontToDesignHeightInTwips
Parameter | Description |
---|---|
aFont | On return, contains a pointer to the nearest font. |
aFontSpec | The specification of the font to be matched. |
Returns: KErrNone if successful; a system-wide error code otherwise.
Gets the font which is the nearest to the given font specification.
When the font is no longer needed, call ReleaseFont().
This new function replaces the deprecated GetNearestFontInTwips() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInTwips() function instead. This will guarantee that every character within any given text string will fit within the given amount of twips, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.
Returns: KErrNone if successful; a system-wide error code otherwise.
Gets the font which is the nearest to the given font specification.
When the font is no longer needed, call ReleaseFont().
The font and bitmap server returns a pointer to the nearest matching font from those available. Matches to max height of font - this does its best to return a font that will fit within the maximum height specified (but note that variations due to hinting algorithms may rarely result in this height being exceeded by up to one pixel). Problems can also be encountered with bitmap fonts where the typeface exists but doesn't have a font small enough.
Returns: KErrNone if successful; a system-wide error code otherwise.
void | ReleaseFont | ( | CFont * | aFont | ) | [pure virtual] |
Releases the specified font.
It is used to indicate that the specified font is no longer needed for use by the device map. As fonts can be shared between applications, this function does not delete the copy of the font from RAM unless the font was only being used by this particular device map.
An implementation is supplied by a derived class.
Parameter | Description |
---|---|
aFont | A pointer to the font to be released. |