|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JaxoGrid
Grid: A grid "is" a collection of Points in the plane. An arbitrary point can be mapped to its closest point on the grid. This interface only knows about points on the grid, not about painting. In general, the grid is assumed to be infinite in all directions, not restricted to current bounding boxes or canvas size (of course, a specific grid could, e.g., claim that there are no grid points with negative coordinates).
Method Summary | |
---|---|
boolean |
isSnapped(Point p)
Determines if 'p' is on the grid. |
Point |
snappedPoint(Point p)
Closest point to 'p' on the grid. |
void |
snapPoint(Point p)
Change 'p' to the closest point on the grid. |
Method Detail |
---|
boolean isSnapped(Point p)
p.equals(snappedPoint(p))
.
p
- The point to snap.
Point snappedPoint(Point p)
p
- The point to snap.
void snapPoint(Point p)
p
- The point to snap.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |