public class MultiPositionData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
Y_DIM
Number of rows in the array.
|
Constructor and Description |
---|
MultiPositionData(@NotNull IsoMapSquareInfo isoMapSquareInfo)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight(int shapeID)
Returns the total height for a multi-square image.
|
int |
getWidth(int shapeID)
Returns the total width for a multi-square image.
|
int |
getXOffset(int shapeID,
int positionID)
Calculate the x-offset from the leftmost pixel of the big face image and
the default x-position (The default position is where a single-square
image would be put).
|
int |
getYOffset(int shapeID,
int positionID)
Calculate the y-offset from the topmost pixel of the big face image and
the default y-position (The default position is where a single-square
image would be put).
|
void |
load(@NotNull ErrorView errorView,
@NotNull java.net.URL url)
Load the array-data from file.
|
public static final int Y_DIM
public MultiPositionData(@NotNull @NotNull IsoMapSquareInfo isoMapSquareInfo)
isoMapSquareInfo
- the iso square info to usepublic void load(@NotNull @NotNull ErrorView errorView, @NotNull @NotNull java.net.URL url)
errorView
- the error view for reporting errorsurl
- the URL of the archdef file to readpublic int getXOffset(int shapeID, int positionID)
shapeID
- ID number for the multi-square shape (-> rows in position
data file)positionID
- number of square in the big bunchpublic int getYOffset(int shapeID, int positionID)
shapeID
- ID number for the multi-square shape (-> rows in position
data file)positionID
- number of square in the big bunchpublic int getWidth(int shapeID)
shapeID
- the shape IDpublic int getHeight(int shapeID)
shapeID
- the shape ID