Record Class MsdfFont.Glyph
java.lang.Object
java.lang.Record
lol.trq.helios.text.MsdfFont.Glyph
- Record Components:
codepoint- the characteradvance- horizontal advanceleft- quad left, from the pen positiontop- quad top, from the baseline (negative is above)right- quad rightbottom- quad bottomu0- atlas left in texture coordinatesv0- atlas topu1- atlas rightv1- atlas bottom
- Enclosing class:
MsdfFont
public static record MsdfFont.Glyph(int codepoint, float advance, float left, float top, float right, float bottom, float u0, float v0, float u1, float v1)
extends Record
One glyph.
-
Constructor Summary
ConstructorsConstructorDescriptionGlyph(int codepoint, float advance, float left, float top, float right, float bottom, float u0, float v0, float u1, float v1) Creates an instance of aGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatadvance()Returns the value of theadvancerecord component.floatbottom()Returns the value of thebottomrecord component.intReturns the value of thecodepointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatleft()Returns the value of theleftrecord component.floatright()Returns the value of therightrecord component.floattop()Returns the value of thetoprecord component.final StringtoString()Returns a string representation of this record class.floatu0()Returns the value of theu0record component.floatu1()Returns the value of theu1record component.floatv0()Returns the value of thev0record component.floatv1()Returns the value of thev1record component.booleanvisible()Returns whether the glyph has anything to draw.
-
Constructor Details
-
Glyph
public Glyph(int codepoint, float advance, float left, float top, float right, float bottom, float u0, float v0, float u1, float v1) Creates an instance of aGlyphrecord class.- Parameters:
codepoint- the value for thecodepointrecord componentadvance- the value for theadvancerecord componentleft- the value for theleftrecord componenttop- the value for thetoprecord componentright- the value for therightrecord componentbottom- the value for thebottomrecord componentu0- the value for theu0record componentv0- the value for thev0record componentu1- the value for theu1record componentv1- the value for thev1record component
-
-
Method Details
-
visible
public boolean visible()Returns whether the glyph has anything to draw.- Returns:
- false for spaces
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
codepoint
-
advance
-
left
-
top
-
right
-
bottom
-
u0
-
v0
-
u1
-
v1
-