Package limn.graphics
Record Class ShapedText.Span
java.lang.Object
java.lang.Record
limn.graphics.ShapedText.Span
- Record Components:
x0- left edgex1- right edge, never less thanx0
- Enclosing class:
ShapedText
One horizontal box of a selection, in logical points from the left edge of the line.
Horizontal only: the band is the caller's, drawn from
ShapedText.metrics(), so one box
serves a selection fill, an IME underline and a composition highlight alike.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.floatwidth()x1 - x0.floatx0()Returns the value of thex0record component.floatx1()Returns the value of thex1record component.
-
Constructor Details
-
Method Details
-
width
public float width()x1 - x0. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared with '=='. -
x0
public float x0()Returns the value of thex0record component.- Returns:
- the value of the
x0record component
-
x1
public float x1()Returns the value of thex1record component.- Returns:
- the value of the
x1record component
-