Package snap.text
Class TextMetrics
java.lang.Object
snap.text.TextMetrics
A class to hold the font metrics for text.
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected double
protected double
protected double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the max ascent of the chars in this line.double
Returns the max descent of the chars in this line.double
Returns the leading of the chars in this line.double
Returns the vertical distance for any line below this line.
-
Field Details
-
_ascent
protected double _ascent -
_descent
protected double _descent -
_leading
protected double _leading -
_lineAdvance
protected double _lineAdvance
-
-
Constructor Details
-
TextMetrics
Constructor.
-
-
Method Details
-
getAscent
public double getAscent()Returns the max ascent of the chars in this line. -
getDescent
public double getDescent()Returns the max descent of the chars in this line. -
getLeading
public double getLeading()Returns the leading of the chars in this line. -
getLineAdvance
public double getLineAdvance()Returns the vertical distance for any line below this line.
-