TextMetrics
classin packageklyn.gui.windows
public class TextMetrics
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)
Properties
Modifier and Type Member Description
public property ascent
ascent as Double
Distance above the baseline.
public property descent
descent as Double
Distance below the baseline.
public property height
height as Double
Recommended baseline spacing for measureFont, estimated height for measureText.
public property width
width as Double
Horizontal text advance, or zero for a face-only measurement.
Constructors
Modifier and Type Member Description
public TextMetrics
TextMetrics(width as Double = 0.0, ascent as Double = 0.0, descent as Double = 0.0, height as Double = 0.0)
No summary.
Methods
Modifier and Type Member Description
public override toString
toString() as String
No summary.