org.grinvin.gred.guides
Class BullsEye
- Guides
Guides consisting of concentric circles divided into sectors. The number of circles
and sectors is configurable.
BullsEye(int numberOfCircles, int numberOfSectors) - Create a new object of this type.
|
void | paint(Graphics2D g2, double scale, double maxX, double maxY) - Paint the bull's eye.
|
void | setNumberOfDivisions(int numberOfCircles, int numberOfSectors) - Set the number of divisions used by this grid.
|
void | snap(double[] coords) - Snap coordinates to the closest grid position.
|
BullsEye
public BullsEye(int numberOfCircles,
int numberOfSectors)
Create a new object of this type.
numberOfCircles
- Number of rows in the grid, i.e., one less than the
number of horizontal grid lines.numberOfSectors
- Number of columns in the grid, i.e., one less than the
number of vertical grid lines.
paint
public void paint(Graphics2D g2,
double scale,
double maxX,
double maxY)
Paint the bull's eye.
- paint in interface Guides
- paint in interface AbstractGuides
setNumberOfDivisions
public void setNumberOfDivisions(int numberOfCircles,
int numberOfSectors)
Set the number of divisions used by this grid.
numberOfCircles
- Number of circles in the bull's eye.numberOfSectors
-
snap
public void snap(double[] coords)
Snap coordinates to the closest grid position.
- snap in interface Guides
- snap in interface AbstractGuides