class TOpenFontCharMetrics |
Character metrics includes more information than TCharacterMetrics.
Character metrics allow characters to be placed horizontally or vertically. The character metrics encapsulated by this class are: Height, Width, Horizontal Bearing X, Horizontal Bearing Y, Horizontal Advance, Vertical Bearing X, Vertical Bearing Y, and Vertical Advance. Their meanings are described in the associated setter and getter functions.
Note :
Vertical drawing (in the sense of characters drawn with horizontal baselines, but in a vertical line) is not yet supported by Symbian OS.
Public Member Functions | |
---|---|
TOpenFontCharMetrics() | |
TOpenFontCharMetrics(TUninitialized) | |
TOpenFontCharMetrics(const TCharacterMetrics &) | |
void | GetHorizBounds(TRect &) |
IMPORT_C TBool | GetTCharacterMetrics(TCharacterMetrics &) |
void | GetVertBounds(TRect &) |
IMPORT_C TGlyphBitmapType | GlyphType() |
TInt | Height() |
TInt | HorizAdvance() |
TInt | HorizBearingX() |
TInt | HorizBearingY() |
IMPORT_C void | SetGlyphType(TGlyphBitmapType) |
void | SetHeight(TInt) |
void | SetHorizAdvance(TInt) |
void | SetHorizBearingX(TInt) |
void | SetHorizBearingY(TInt) |
void | SetVertAdvance(TInt) |
void | SetVertBearingX(TInt) |
void | SetVertBearingY(TInt) |
void | SetWidth(TInt) |
TInt | VertAdvance() |
TInt | VertBearingX() |
TInt | VertBearingY() |
TInt | Width() |
Public Member Enumerations | |
---|---|
enum | TUninitialized { EUninitialized } |
TOpenFontCharMetrics | ( | ) | [inline] |
Default constructor initializes all members to 0.
Default C++ constructor.
The constructor initialises all data members to zero. As for other T classes, there is no need to explicitly cleanup TOpenFontCharMetrics objects.
TOpenFontCharMetrics | ( | TUninitialized | ) | [inline] |
Constructor that does not initialize any members.
TUninitialized |
IMPORT_C | TOpenFontCharMetrics | ( | const TCharacterMetrics & | aMetrics | ) |
const TCharacterMetrics & aMetrics |
void | GetHorizBounds | ( | TRect & | aBounds | ) | const [inline] |
Gets the bounds of the character relative to its origin when setting text horizontally.
The origin here is the pen point before the character is drawn.
TRect & aBounds | The character's bounds. |
IMPORT_C TBool | GetTCharacterMetrics | ( | TCharacterMetrics & | aMetrics | ) | const |
TCharacterMetrics & aMetrics |
void | GetVertBounds | ( | TRect & | aBounds | ) | const [inline] |
Gets the bounds of the character relative to its origin when setting text vertically.
The origin here is the pen point before the character is drawn.
TRect & aBounds | The character's bounds. |
TInt | Height | ( | ) | const [inline] |
Gets the height of the character's bitmap.
The character's height in pixels.
TInt | HorizAdvance | ( | ) | const [inline] |
Gets the horizontal advance.
This is the amount added to the x co-ordinate of the origin after the character is drawn what most people understand by the width or escapement of a character. The origin here is the pen point before the character is drawn.
The horizontal advance in pixels
TInt | HorizBearingX | ( | ) | const [inline] |
Gets the horizontal bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing horizontally. A positive value means that the left edge of the bitmap is right of the origin.
The horizontal bearing X in pixels
TInt | HorizBearingY | ( | ) | const [inline] |
Gets horizontal bearing Y.
This is the vertical distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing horizontally. A positive value means that the top edge of the bitmap is above the origin
The horizontal bearing Y in pixels.
IMPORT_C void | SetGlyphType | ( | TGlyphBitmapType | ) |
TGlyphBitmapType |
void | SetHeight | ( | TInt | aHeight | ) | [inline] |
Sets the height of the character's bitmap.
TInt aHeight | The character height (in pixels). |
void | SetHorizAdvance | ( | TInt | aHorizAdvance | ) | [inline] |
Sets the horizontal advance.
This is the amount added to the x co-ordinate of the origin after the character is drawn, what most people understand by the width or escapement of a character. The origin here is the pen point before the character is drawn.
TInt aHorizAdvance | The horizontal advance (in pixels). |
void | SetHorizBearingX | ( | TInt | aHorizBearingX | ) | [inline] |
Sets the horizontal bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing horizontally. A positive value means that the left edge of the bitmap is right of the origin.
TInt aHorizBearingX | The horizontal bearing X (in pixels). |
void | SetHorizBearingY | ( | TInt | aHorizBearingY | ) | [inline] |
Sets the horizontal bearing Y.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing horizontally. A positive value means that the top edge of the bitmap is above the origin.
TInt aHorizBearingY | The horizontal bearing Y (in pixels). |
void | SetVertAdvance | ( | TInt | aVertAdvance | ) | [inline] |
Sets the vertical advance.
When drawing vertically, this is the amount added to the y co-ordinate of the origin after the character is drawn what most people understand by the height of a character. The origin here is the pen point before the character is drawn.
Note: Vertical drawing is not supported in v5.
TInt aVertAdvance | The vertical advance (in pixels). |
void | SetVertBearingX | ( | TInt | aVertBearingX | ) | [inline] |
Set vertical bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing vertically. A positive value means that the left edge of the bitmap is right of the origin.
TInt aVertBearingX | The vertical bearing X (in pixels). |
void | SetVertBearingY | ( | TInt | aVertBearingY | ) | [inline] |
Sets the vertical bearing Y.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing vertically. A positive value means that the top edge of the bitmap is above the origin.
TInt aVertBearingY | The vertical bearing Y (in pixels). |
void | SetWidth | ( | TInt | aWidth | ) | [inline] |
Sets the width of the character's bitmap.
TInt aWidth | The width of the bitmap in pixels. |
TInt | VertAdvance | ( | ) | const [inline] |
Gets the vertical advance.
When drawing vertically, this is the amount added to the y co-ordinate of the origin after the character is drawn what most people understand by the height of a character. The origin here is the pen point before the character is drawn.
Note: Vertical drawing is not supported in v5.
The vertical advance in pixels.
TInt | VertBearingX | ( | ) | const [inline] |
Gets the vertical bearing X.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the left edge of the bitmap, when drawing vertically. A positive value means that the left edge of the bitmap is right of the origin.
The vertical bearing X in pixels.
TInt | VertBearingY | ( | ) | const [inline] |
Gets the vertical bearing Y.
This is the distance in pixels from the pen point before the character is drawn (the origin) to the top edge of the bitmap, when drawing vertically. A positive value means that the top edge of the bitmap is above the origin.
The vertical bearing Y in pixels.
TInt | Width | ( | ) | const [inline] |
Gets the width of the character's bitmap.
The width of the bitmap in pixels.