public final class Grid extends Object
The grid is defined by its origin and the spacing between the equidistant grid lines.
Constructor and Description |
---|
Grid(double originX,
double originY,
double spacing)
Creates a new
Grid instance. |
Modifier and Type | Method and Description |
---|---|
double |
getOriginX()
Gets the x-coordinate of the origin.
|
double |
getOriginY()
Gets the y-coordinate of the origin.
|
double |
getSpacing()
Gets the spacing between the horizontal and vertical grid lines.
|
String |
toString()
Returns a string representation of the
Grid object. |
public Grid(double originX, double originY, double spacing)
Grid
instance.
The spacing between the grid lines must be at least 1
. If the given spacing is smaller, value 1
is
assumed.
originX
- the x-coordinate of the origin of the gridoriginY
- the y-coordinate of the origin of the gridspacing
- the spacing between the grid linespublic final double getOriginX()
public final double getOriginY()
public final double getSpacing()