Module technology.sola.engine
Record Class TextRenderDetails
java.lang.Object
java.lang.Record
technology.sola.engine.graphics.gui.util.TextRenderDetails
- Record Components:
lineHeight- the line heightlines- the string of text in each linedimensions- the dimensions of the text for rendering
@NullMarked
public record TextRenderDetails(int lineHeight, List<String> lines, GuiElementDimensions dimensions)
extends Record
TextRenderDetails contains the rendering information needed for text.
-
Constructor Summary
ConstructorsConstructorDescriptionTextRenderDetails(int lineHeight, List<String> lines, GuiElementDimensions dimensions) Creates an instance of aTextRenderDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelineHeightrecord component.lines()Returns the value of thelinesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextRenderDetails
Creates an instance of aTextRenderDetailsrecord class.- Parameters:
lineHeight- the value for thelineHeightrecord componentlines- the value for thelinesrecord componentdimensions- the value for thedimensionsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
lineHeight
public int lineHeight()Returns the value of thelineHeightrecord component.- Returns:
- the value of the
lineHeightrecord component
-
lines
Returns the value of thelinesrecord component.- Returns:
- the value of the
linesrecord component
-
dimensions
Returns the value of thedimensionsrecord component.- Returns:
- the value of the
dimensionsrecord component
-