Record Class FixedTextMeasurer.Measurement
java.lang.Object
java.lang.Record
io.leandev.appfuse.pdf.FixedTextMeasurer.Measurement
- Record Components:
widthPt- 含字距的行寬(pt)ascentPt- 所用字型的最大 ascent(pt);空字串以空白字元的字型計算,與 renderer 的空行相同descentPt- 所用字型的最大 descent(pt,正值)runs- 依實際使用字型切分的連續片段
- Enclosing interface:
FixedTextMeasurer
public static record FixedTextMeasurer.Measurement(double widthPt, double ascentPt, double descentPt, List<FixedTextMeasurer.Run> runs)
extends Record
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionMeasurement(double widthPt, double ascentPt, double descentPt, List<FixedTextMeasurer.Run> runs) Creates an instance of aMeasurementrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleascentPt()Returns the value of theascentPtrecord component.doubleReturns the value of thedescentPtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.runs()Returns the value of therunsrecord component.final StringtoString()Returns a string representation of this record class.doublewidthPt()Returns the value of thewidthPtrecord component.
-
Constructor Details
-
Measurement
public Measurement(double widthPt, double ascentPt, double descentPt, List<FixedTextMeasurer.Run> runs) Creates an instance of aMeasurementrecord class.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
widthPt
-
ascentPt
-
descentPt
-
runs
-