Package net.sf.gridarta.model.gameobject
Class MultiPositionEntry
- java.lang.Object
-
- net.sf.gridarta.model.gameobject.MultiPositionEntry
-
public class MultiPositionEntry extends java.lang.ObjectEncapsulated information about a multi-square image.
-
-
Constructor Summary
Constructors Constructor Description MultiPositionEntry(@NotNull IsoMapSquareInfo isoMapSquareInfo, @NotNull java.awt.Dimension size)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHeight()Returns the total height of a multi-square image.intgetWidth()Returns the total width of a multi-square image.intgetXOffset(int positionID)Returns the x offset from the left-most pixel of the multi-square image and the default x position.intgetYOffset(int positionID)Returns the y offset from the left-most pixel of the multi-square image and the default y position.
-
-
-
Constructor Detail
-
MultiPositionEntry
public MultiPositionEntry(@NotNull @NotNull IsoMapSquareInfo isoMapSquareInfo, @NotNull @NotNull java.awt.Dimension size)Creates a new instance.- Parameters:
isoMapSquareInfo- the iso information to usesize- the size of the entry in map squares
-
-
Method Detail
-
getXOffset
public int getXOffset(int positionID)
Returns the x offset from the left-most pixel of the multi-square image and the default x position. (The default position is where a single-square image would be put.)- Parameters:
positionID- the square number in the multi-square- Returns:
- the x offset
-
getYOffset
public int getYOffset(int positionID)
Returns the y offset from the left-most pixel of the multi-square image and the default y position. (The default position is where a single-square image would be put.)- Parameters:
positionID- the square number in the multi-square- Returns:
- the y offset
-
getWidth
public int getWidth()
Returns the total width of a multi-square image.- Returns:
- the width in pixels
-
getHeight
public int getHeight()
Returns the total height of a multi-square image.- Returns:
- the height in pixels
-
-