public class TextMetrics
Result of Painter.measureText or Painter.measureFont. measureText supplies estimates; measureFont supplies native face metrics.
metrics = TextMetrics(64.0, 9.0, 3.0, 12.0) print(metrics.width)
| Modifier and Type | Member | Description |
|---|---|---|
| public property | ascentascent as Double |
Distance above the baseline. |
| public property | descentdescent as Double |
Distance below the baseline. |
| public property | heightheight as Double |
Recommended baseline spacing for measureFont, estimated height for measureText. |
| public property | widthwidth as Double |
Horizontal text advance, or zero for a face-only measurement. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | TextMetricsTextMetrics(width as Double = 0.0, ascent as Double = 0.0, descent as Double = 0.0, height as Double = 0.0) |
No summary. |