Record Class LoadableTex2d
java.lang.Object
java.lang.Record
dev.pfaff.altargui.LoadableTex2d
-
Constructor Summary
ConstructorsConstructorDescriptionReturns a new instance specifying the entire region of the provided texture.LoadableTex2d
(LoadableTexture tex, Tex2d coords) Creates an instance of aLoadableTex2d
record class. -
Method Summary
Modifier and TypeMethodDescriptioncoords()
Returns the value of thecoords
record component.final boolean
Indicates whether some other object is "equal to" this one.static LoadableTex2d
fromPixelCoords
(LoadableTexture tex, int u1_i, int v1_i, int u2_i, int v2_i, int textureWidth, int textureHeight) static LoadableTex2d
fromPixelExtent
(LoadableTexture tex, int u, int v, int uExtent, int vExtent, int textureWidth, int textureHeight) final int
hashCode()
Returns a hash code value for this object.tex()
Returns the value of thetex
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LoadableTex2d
Creates an instance of aLoadableTex2d
record class.- Parameters:
tex
- the value for thetex
record componentcoords
- the value for thecoords
record component
-
LoadableTex2d
Returns a new instance specifying the entire region of the provided texture.
-
-
Method Details
-
fromPixelCoords
public static LoadableTex2d fromPixelCoords(LoadableTexture tex, int u1_i, int v1_i, int u2_i, int v2_i, int textureWidth, int textureHeight) -
fromPixelExtent
public static LoadableTex2d fromPixelExtent(LoadableTexture tex, int u, int v, int uExtent, int vExtent, int textureWidth, int textureHeight) -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
tex
Returns the value of thetex
record component.- Returns:
- the value of the
tex
record component
-
coords
Returns the value of thecoords
record component.- Returns:
- the value of the
coords
record component
-