Package io.github.toxicity188.javamesh
Record Class MeshImage.Awt
java.lang.Object
java.lang.Record
io.github.toxicity188.javamesh.MeshImage.Awt
- Record Components:
image- wrapped source image
- All Implemented Interfaces:
MeshImage
- Enclosing interface:
MeshImage
public static record MeshImage.Awt(@NotNull BufferedImage image)
extends Record
implements MeshImage
BufferedImage-backed MeshImage implementation.- Since:
- 0.0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.toxicity188.javamesh.MeshImage
MeshImage.Awt -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAwt(@NotNull BufferedImage image) Creates an instance of aAwtrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the image height in pixels.@NotNull BufferedImageimage()Returns the value of theimagerecord component.intrgb(int x, int z) Returns the ARGB color of a texture pixel.final StringtoString()Returns a string representation of this record class.intwidth()Returns the image width in pixels.
-
Constructor Details
-
Awt
Creates an instance of aAwtrecord class.- Parameters:
image- the value for theimagerecord component
-
-
Method Details
-
height
public int height()Description copied from interface:MeshImageReturns the image height in pixels. -
width
public int width()Description copied from interface:MeshImageReturns the image width in pixels. -
rgb
public int rgb(int x, int z) Description copied from interface:MeshImageReturns the ARGB color of a texture pixel. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-