Interface Measurer
- All Known Implementing Classes:
PdfMeasurer, ScreenMeasurer
public interface Measurer
Measures text for DocumentLayout, in points.
Pagination depends on every width, so the screen and a PDF only show the same pages when
both are laid out with the same measurer. DocumentView uses ScreenMeasurer by default
and the PDF export PdfMeasurer.
-
Method Summary
Modifier and TypeMethodDescriptionfloatThe distance from the top of a line of this style to its baseline.floatThe distance from the baseline to the bottom of a line of this style.floatThe advance width of text drawn in a style.
-
Method Details
-
width
-
ascent
The distance from the top of a line of this style to its baseline.
Parameters
style: the style
Returns
the ascent in points
-
descent
The distance from the baseline to the bottom of a line of this style.
Parameters
style: the style
Returns
the descent in points, positive
-