Record Class BitmapProvider.Glyph
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.BitmapProvider.Glyph
- All Implemented Interfaces:
GlyphInfo
- Enclosing class:
BitmapProvider
static record BitmapProvider.Glyph(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent)
extends Record
implements GlyphInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.blaze3d.font.GlyphInfo
GlyphInfo.SpaceGlyphInfo
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for theadvance
record component.private final int
The field for theascent
record component.private final int
The field for theheight
record component.private final NativeImage
The field for theimage
record component.private final int
The field for theoffsetX
record component.private final int
The field for theoffsetY
record component.private final float
The field for thescale
record component.private final int
The field for thewidth
record component. -
Constructor Summary
ConstructorDescriptionGlyph
(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent) Creates an instance of aGlyph
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
advance()
Returns the value of theadvance
record component.int
ascent()
Returns the value of theascent
record component.bake
(Function<SheetGlyphInfo, BakedGlyph> p_232640_) final boolean
Indicates whether some other object is "equal to" this one.float
final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.image()
Returns the value of theimage
record component.int
offsetX()
Returns the value of theoffsetX
record component.int
offsetY()
Returns the value of theoffsetY
record component.float
scale()
Returns the value of thescale
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mojang.blaze3d.font.GlyphInfo
getAdvance, getBoldOffset, getShadowOffset
-
Field Details
-
scale
private final float scaleThe field for thescale
record component. -
image
The field for theimage
record component. -
offsetX
private final int offsetXThe field for theoffsetX
record component. -
offsetY
private final int offsetYThe field for theoffsetY
record component. -
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
advance
private final int advanceThe field for theadvance
record component. -
ascent
private final int ascentThe field for theascent
record component.
-
-
Constructor Details
-
Glyph
Glyph(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent) Creates an instance of aGlyph
record class.- Parameters:
scale
- the value for thescale
record componentimage
- the value for theimage
record componentoffsetX
- the value for theoffsetX
record componentoffsetY
- the value for theoffsetY
record componentwidth
- the value for thewidth
record componentheight
- the value for theheight
record componentadvance
- the value for theadvance
record componentascent
- the value for theascent
record component
-
-
Method Details
-
getAdvance
public float getAdvance()- Specified by:
getAdvance
in interfaceGlyphInfo
-
bake
-
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 '=='. -
scale
public float scale()Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-
image
Returns the value of theimage
record component.- Returns:
- the value of the
image
record component
-
offsetX
public int offsetX()Returns the value of theoffsetX
record component.- Returns:
- the value of the
offsetX
record component
-
offsetY
public int offsetY()Returns the value of theoffsetY
record component.- Returns:
- the value of the
offsetY
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
advance
public int advance()Returns the value of theadvance
record component.- Returns:
- the value of the
advance
record component
-
ascent
public int ascent()Returns the value of theascent
record component.- Returns:
- the value of the
ascent
record component
-