#include <Pt/Gfx/TextMetrics.h>
Metrics for a measured line of text. More...
Public Member Functions | |
| TextMetrics () | |
| Constructs empty text metrics. | |
| Float | advance () const |
| Returns the advance width of the text. | |
| void | setAdvance (Float n) |
| Sets the advance width of the text. | |
| Float | bearingX () const |
| Returns the horizontal bearing from origin to bounding box. | |
| void | setBearingX (Float n) |
| Sets the horizontal bearing. | |
| Float | bearingY () const |
| Returns the vertical bearing from baseline to top of bounding box. | |
| void | setBearingY (Float n) |
| Sets the vertical bearing. | |
| Float | boundingWidth () const |
| Returns the width of the bounding box. | |
| void | setBoundingWidth (Float n) |
| Sets the bounding box width. | |
| Float | boundingHeight () const |
| Returns the height of the bounding box. | |
| void | setBoundingHeight (Float n) |
| Sets the bounding box height. | |
TextMetrics stores the horizontal advance and bounding-box information of a rendered text run. Painters return this structure when text needs to be aligned before it is drawn.