public abstract class AbstractLocation extends java.lang.Object implements Location
Constructor and Description |
---|
AbstractLocation() |
Modifier and Type | Method and Description |
---|---|
Location |
newLocationSnappedToGrid(int gridX,
int gridY)
Return a new location, snapped to the grid based on a spacing of
(gridX, gridY) . |
java.lang.String |
toString()
Textual representation of this location formatted as
(x, y) . |
public Location newLocationSnappedToGrid(int gridX, int gridY)
Location
(gridX, gridY)
.newLocationSnappedToGrid
in interface Location
gridX
- the horizontal grid spacing in pixelsgridY
- the vertical grid spacing in pixelspublic java.lang.String toString()
(x, y)
.toString
in class java.lang.Object