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

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The field for the advance record component.
    private final int
    The field for the ascent record component.
    private final int
    The field for the height record component.
    private final NativeImage
    The field for the image record component.
    private final int
    The field for the offsetX record component.
    private final int
    The field for the offsetY record component.
    private final float
    The field for the scale record component.
    private final int
    The field for the width record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Glyph(float scale, NativeImage image, int offsetX, int offsetY, int width, int height, int advance, int ascent)
    Creates an instance of a Glyph record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the advance record component.
    int
    Returns the value of the ascent record component.
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
     
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    Returns the value of the image record component.
    int
    Returns the value of the offsetX record component.
    int
    Returns the value of the offsetY record component.
    float
    Returns the value of the scale record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width 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 scale
      The field for the scale record component.
    • image

      private final NativeImage image
      The field for the image record component.
    • offsetX

      private final int offsetX
      The field for the offsetX record component.
    • offsetY

      private final int offsetY
      The field for the offsetY record component.
    • width

      private final int width
      The field for the width record component.
    • height

      private final int height
      The field for the height record component.
    • advance

      private final int advance
      The field for the advance record component.
    • ascent

      private final int ascent
      The field for the ascent 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 a Glyph record class.
      Parameters:
      scale - the value for the scale record component
      image - the value for the image record component
      offsetX - the value for the offsetX record component
      offsetY - the value for the offsetY record component
      width - the value for the width record component
      height - the value for the height record component
      advance - the value for the advance record component
      ascent - the value for the ascent record component
  • Method Details

    • getAdvance

      public float getAdvance()
      Specified by:
      getAdvance in interface GlyphInfo
    • bake

      public BakedGlyph bake(Function<SheetGlyphInfo,BakedGlyph> p_232640_)
      Specified by:
      bake in interface GlyphInfo
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • scale

      public float scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • image

      public NativeImage image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • offsetX

      public int offsetX()
      Returns the value of the offsetX record component.
      Returns:
      the value of the offsetX record component
    • offsetY

      public int offsetY()
      Returns the value of the offsetY record component.
      Returns:
      the value of the offsetY record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • advance

      public int advance()
      Returns the value of the advance record component.
      Returns:
      the value of the advance record component
    • ascent

      public int ascent()
      Returns the value of the ascent record component.
      Returns:
      the value of the ascent record component