public class RectGrid<T> extends AbstractGrid<T>
Modifier and Type | Field and Description |
---|---|
protected PointF |
mCellHaftSize |
protected PointF |
mCellSize |
protected boolean |
mFlipVertical |
mBounds, mData, mScratchList, mSize, mUseCellCenter, TAG
Constructor and Description |
---|
RectGrid(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
void |
cellToPoint(int cellX,
int cellY,
PointF point) |
void |
cellToPoint(Point cell,
PointF point) |
protected int |
convertVertical(int cellY) |
void |
dispose() |
void |
flipVertical(boolean flipVertical)
Flip vertically, can be used in AXIS_BOTTOM_LEFT mode
|
PointF |
getCellSize() |
int |
getCellX(float x) |
int |
getCellY(float y) |
float |
getPointX(int cellX) |
float |
getPointY(int cellY) |
boolean |
isFlipVertical() |
void |
pointToCell(float x,
float y,
Point cell) |
void |
pointToCell(PointF p,
Point cell) |
void |
setCellSize(float cellWidth,
float cellHeight) |
protected void |
updateBounds() |
cellToPointPath, cellToPointPath, getBounds, getDataAt, getSize, setDataAt, setSize
protected PointF mCellSize
protected PointF mCellHaftSize
protected boolean mFlipVertical
public void setCellSize(float cellWidth, float cellHeight)
public PointF getCellSize()
protected void updateBounds()
updateBounds
in class AbstractGrid<T>
public void pointToCell(float x, float y, Point cell)
public void pointToCell(PointF p, Point cell)
public void cellToPoint(int cellX, int cellY, PointF point)
public void cellToPoint(Point cell, PointF point)
public int getCellX(float x)
public int getCellY(float y)
public float getPointX(int cellX)
public float getPointY(int cellY)
public boolean isFlipVertical()
public void flipVertical(boolean flipVertical)
flipVertical
- Scene.AXIS_BOTTOM_LEFT, Scene.AXIS_TOP_LEFT
protected int convertVertical(int cellY)