Record Class BedrockTrueTypeRaster.Glyph
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.render.font.BedrockTrueTypeRaster.Glyph
- Enclosing class:
BedrockTrueTypeRaster
public static record BedrockTrueTypeRaster.Glyph(int width, int height, float left, float top, float advance, float oversample, byte[] pixels, BedrockTrueTypeRaster.Sampling sampling)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGlyph(int width, int height, float left, float top, float advance, float oversample, byte[] pixels, BedrockTrueTypeRaster.Sampling sampling) Creates an instance of aGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatadvance()Returns the value of theadvancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.floatleft()Returns the value of theleftrecord component.floatReturns the value of theoversamplerecord component.byte[]pixels()Returns the value of thepixelsrecord component.sampling()Returns the value of thesamplingrecord component.floattop()Returns the value of thetoprecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
Glyph
public Glyph(int width, int height, float left, float top, float advance, float oversample, byte[] pixels, BedrockTrueTypeRaster.Sampling sampling) Creates an instance of aGlyphrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentleft- the value for theleftrecord componenttop- the value for thetoprecord componentadvance- the value for theadvancerecord componentoversample- the value for theoversamplerecord componentpixels- the value for thepixelsrecord componentsampling- the value for thesamplingrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
left
public float left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
top
public float top()Returns the value of thetoprecord component.- Returns:
- the value of the
toprecord component
-
advance
public float advance()Returns the value of theadvancerecord component.- Returns:
- the value of the
advancerecord component
-
oversample
public float oversample()Returns the value of theoversamplerecord component.- Returns:
- the value of the
oversamplerecord component
-
pixels
public byte[] pixels()Returns the value of thepixelsrecord component.- Returns:
- the value of the
pixelsrecord component
-
sampling
Returns the value of thesamplingrecord component.- Returns:
- the value of the
samplingrecord component
-