Record Class TextureAtlasScale
java.lang.Object
java.lang.Record
dev.pfaff.altargui.texture.TextureAtlasScale
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTextureAtlasScale
(byte xShiftByte, byte yShiftByte) Creates an instance of aTextureAtlasScale
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
char
atlasToPixelsX
(char x) int
atlasToPixelsX
(int x) char
atlasToPixelsY
(char y) int
atlasToPixelsY
(int y) int
final boolean
Indicates whether some other object is "equal to" this one.static TextureAtlasScale
fromAtlasSize
(int width, int height) final int
hashCode()
Returns a hash code value for this object.char
pixelsToAtlasX
(char x) int
pixelsToAtlasX
(int x) char
pixelsToAtlasY
(char y) int
pixelsToAtlasY
(int y) final String
toString()
Returns a string representation of this record class.int
xShift()
byte
Returns the value of thexShiftByte
record component.int
yShift()
byte
Returns the value of theyShiftByte
record component.
-
Field Details
-
MAX_SIZE
public static final int MAX_SIZE- See Also:
-
-
Constructor Details
-
TextureAtlasScale
public TextureAtlasScale(byte xShiftByte, byte yShiftByte) Creates an instance of aTextureAtlasScale
record class.- Parameters:
xShiftByte
- the value for thexShiftByte
record componentyShiftByte
- the value for theyShiftByte
record component
-
-
Method Details
-
fromAtlasSize
-
xShift
public int xShift() -
yShift
public int yShift() -
atlasWidth
public int atlasWidth() -
atlasHeight
public int atlasHeight() -
pixelsToAtlasX
public char pixelsToAtlasX(char x) -
pixelsToAtlasY
public char pixelsToAtlasY(char y) -
atlasToPixelsX
public char atlasToPixelsX(char x) -
atlasToPixelsY
public char atlasToPixelsY(char y) -
pixelsToAtlasX
public int pixelsToAtlasX(int x) -
pixelsToAtlasY
public int pixelsToAtlasY(int y) -
atlasToPixelsX
public int atlasToPixelsX(int x) -
atlasToPixelsY
public int atlasToPixelsY(int y) -
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 with '=='. -
xShiftByte
public byte xShiftByte()Returns the value of thexShiftByte
record component.- Returns:
- the value of the
xShiftByte
record component
-
yShiftByte
public byte yShiftByte()Returns the value of theyShiftByte
record component.- Returns:
- the value of the
yShiftByte
record component
-