public class Spiral2DPathIterator extends ParametricPathIterator
This path can be modeled by:
centerX+coilGap*(t+coilOffset)*Math.cos(2*Math.PI*t*m+angularOffset);
centerY+coilGap*(t+coilOffset)*Math.sin(2*Math.PI*t*m+angularOffset);
Spiral2D
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO| Constructor and Description |
|---|
Spiral2DPathIterator(double centerX, double centerY, double coilGap, double coils, double angularOffset, double coilOffset, boolean clockwise)
Create a new
Spiral2DPathIterator.
|
Spiral2DPathIterator(double centerX, double centerY, double coilGap, double coils, double angularOffset, double coilOffset, boolean clockwise, boolean outward)
Create a new
Spiral2DPathIterator.
|
Spiral2DPathIterator(double centerX, double centerY, double coilGap, double coils, double angularOffset, double coilOffset, boolean clockwise, boolean outward, AffineTransform
Create a new
Spiral2DPathIterator.
|
| Modifier and Type | Method and Description |
|---|---|
static GeneralPath |
createSpiral(double centerX, double centerY, double coilGap, double coils, double angularOffset, double coilOffset, boolean clockwise, boolean outward)
Create a spiral stored in a
GeneralPath.
|
protected double |
getDX(double t)
|
protected double |
getDY(double t)
|
protected double |
getMaxT()
The highest value for t.
|
protected double |
getNextT(double t)
The t-value that we should use next.
|
protected double |
getX(double t)
|
protected double |
getY(double t)
|
currentSegment, currentSegment, getWindingRule, isDone, nextpublic Spiral2DPathIterator(double centerX,
double centerY,
double coilGap,
double coils,
double angularOffset,
double coilOffset,
boolean clockwise,
boolean outward)
Spiral2DPathIterator.
centerX - the x-coordinate of the center.
centerY - the y-coordinate of the center.
coilGap - the space between coils.
coils - the number of coils in this spiral.
angularOffset - the angle at the center of this spiral.
coilOffset - the space from the center of the spiral to where the path begins painting.
clockwise - whether this spiral spins out from the center
outward - whether this spiral spins out from the center, or inwards towards it. clockwise (true) or counter-clockwise (false). This argument only matters if you're going to closely study the path this iterator returns. If you simply render it: this argument is meaningless.
public Spiral2DPathIterator(double centerX,
double centerY,
double coilGap,
double coils,
double angularOffset,
double coilOffset,
boolean clockwise)
Spiral2DPathIterator.
centerX - the x-coordinate of the center.
centerY - the y-coordinate of the center.
coilGap - the space between coils.
coils - the number of coils in this spiral.
angularOffset - the angle at the center of this spiral.
coilOffset - the space from the center of the spiral to where the path begins painting.
clockwise - whether this spiral spins out from the center clockwise (true) or counter-clockwise (false).
public Spiral2DPathIterator(double centerX,
double centerY,
double coilGap,
double coils,
double angularOffset,
double coilOffset,
boolean clockwise,
boolean outward,
AffineTransform transform)
Spiral2DPathIterator.
centerX - the x-coordinate of the center.
centerY - the y-coordinate of the center.
coilGap - the space between coils.
coils - the number of coils in this spiral.
angularOffset - the angle at the center of this spiral.
coilOffset - the space from the center of the spiral to where the path begins painting.
clockwise - whether this spiral spins out from the center clockwise (true) or counter-clockwise (false).
outward - whether this spiral spins out from the center, or inwards towards it. This argument only matters if you're going to closely study the path this iterator returns. If you simply render it: this argument is meaningless.
transform - an optional AffineTransform to apply to this path.
public static GeneralPathcreateSpiral(double centerX, double centerY, double coilGap, double coils, double angularOffset, double coilOffset, boolean clockwise, boolean outward)
GeneralPath.
centerX - the x-coordinate of the center.
centerY - the y-coordinate of the center.
coilGap - the space between coils.
coils - the number of coils in this spiral.
angularOffset - the angle at the center of this spiral.
coilOffset - the space from the center of the spiral to where the path begins painting.
clockwise - whether this spiral spins out from the center
outward - whether this spiral spins out from the center, or inwards towards it. clockwise (true) or counter-clockwise (false). This argument only matters if you're going to closely study the path this iterator returns. If you simply render it: this argument is meaningless.
protected double getDX(double t)
protected double getDY(double t)
protected double getX(double t)
protected double getY(double t)
protected double getMaxT()
ParametricPathIterator
getMaxT in class
ParametricPathIterator
protected double getNextT(double t)
ParametricPathIterator
getMaxT(), then the maximum is used in the next segment and this PathIterator is finished.
getNextT in class
ParametricPathIterator
t - the current t-value