Class FixedMeasurer
java.lang.Object
io.leandev.appfuse.report.internal.pdf.FixedMeasurer
- All Implemented Interfaces:
FixedTextMeasurer, AutoCloseable
公開量測器的實作;與 FixedRenderer 共用 PdfTextMeasurer 與 FixedTextMetrics。
-
Nested Class Summary
Nested classes/interfaces inherited from interface FixedTextMeasurer
FixedTextMeasurer.Measurement, FixedTextMeasurer.Run -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()釋放已解析的字型;之後的量測丟出 IllegalStateException。Tab 展開成四個空格,與FixedDocument.Text一致;換行與其他控制字元拒絕。Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FixedTextMeasurer
measure
-
Constructor Details
-
FixedMeasurer
-
-
Method Details
-
measure
public FixedTextMeasurer.Measurement measure(String text, String family, double sizePt, boolean bold, double letterSpacingPt) Description copied from interface:FixedTextMeasurerTab 展開成四個空格,與FixedDocument.Text一致;換行與其他控制字元拒絕。- Specified by:
measurein interfaceFixedTextMeasurer- Parameters:
text- 單行文字family- 邏輯字型家族sizePt- 字級(pt)bold- 是否使用粗體字面letterSpacingPt- 相鄰字元間的額外距離(pt,非負)- Returns:
- 量測結果
-
close
public void close()Description copied from interface:FixedTextMeasurer釋放已解析的字型;之後的量測丟出 IllegalStateException。- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceFixedTextMeasurer
-