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 | 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.
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.
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
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.
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.
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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.