|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.Curve
This class provides methods for calculating points and bounds for linear, quadratic and cubic curves.
A Curve object is stateless but the methods are not static so that a better implementation can be created and substituted for the static variable "curve" if necessary.
| Field Summary | |
static Curve |
curve
|
static int |
MAX_POINTS
|
| Constructor Summary | |
Curve()
|
|
| Method Summary | |
int |
calculateCubes(float[] xpoints,
float[] ypoints,
int pointsOffset,
Object destX,
Object destY,
int offset,
int options)
Calculate the curve points for the curve. |
protected int |
calculateCubes(float startx,
float starty,
float control1x,
float control1y,
float control2x,
float control2y,
float endx,
float endy,
Object destx,
Object desty,
int offset,
int options)
|
int |
calculateLines(float[] xpoints,
float[] ypoints,
int pointsOffset,
Object destX,
Object destY,
int offset,
int options)
Calculate the line points for the line. |
protected int |
calculateLines(float startx,
float starty,
float endx,
float endy,
Object destx,
Object desty,
int offset,
int options)
This calculates the points on a quad curve, for either the x or y co-ordinate. |
int |
calculateQuads(float[] xpoints,
float[] ypoints,
int pointsOffset,
Object destX,
Object destY,
int offset,
int options)
Calculate the curve points for the curve. |
protected int |
calculateQuads(float startx,
float starty,
float controlx,
float controly,
float endx,
float endy,
Object destx,
Object desty,
int offset,
int options)
This calculates the points on a quad curve, for either the x or y co-ordinate. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public static Curve curve
public static final int MAX_POINTS
| Constructor Detail |
public Curve()
| Method Detail |
protected int calculateLines(float startx,
float starty,
float endx,
float endy,
Object destx,
Object desty,
int offset,
int options)
This method does NOT include the last point on the curve, but DOES include the first one.
protected int calculateQuads(float startx,
float starty,
float controlx,
float controly,
float endx,
float endy,
Object destx,
Object desty,
int offset,
int options)
This method does NOT include the last point on the curve, but DOES include the first one.
protected int calculateCubes(float startx,
float starty,
float control1x,
float control1y,
float control2x,
float control2y,
float endx,
float endy,
Object destx,
Object desty,
int offset,
int options)
public int calculateLines(float[] xpoints,
float[] ypoints,
int pointsOffset,
Object destX,
Object destY,
int offset,
int options)
xpoints - The X coordinates for the curve.
The first one should be the start point, the second should be the end point.ypoints - The Y coordinates for the curve.
The first one should be the start point, the second should be the end point.
one should be the end point.pointsOffset - The offset of the points in the xpoints and ypoints array.destX - Either an int[] or float[] object to hold the destination X points. Can be
null if you only are interested in the number of points that will be calculated.destY - Either an int[] or float[] object to hold the destination Y points. Can be
null if you only are interested in the number of points that will be calculated.offset - The offset into the destX and destY arrays for the points to go.options - No options are currently defined.
public int calculateQuads(float[] xpoints,
float[] ypoints,
int pointsOffset,
Object destX,
Object destY,
int offset,
int options)
xpoints - The X coordinates for the curve.
The first one should be the start point, the second should be the control point and the third
one should be the end point.ypoints - The Y coordinates for the curve.
The first one should be the start point, the second should be the control point and the third
one should be the end point.pointsOffset - The offset of the points in the xpoints and ypoints array.destX - Either an int[] or float[] object to hold the destination X points. Can be
null if you only are interested in the number of points that will be calculated.destY - Either an int[] or float[] object to hold the destination Y points. Can be
null if you only are interested in the number of points that will be calculated.offset - The offset into the destX and destY arrays for the points to go.options - No options are currently defined.
public int calculateCubes(float[] xpoints,
float[] ypoints,
int pointsOffset,
Object destX,
Object destY,
int offset,
int options)
xpoints - The X coordinates for the curve.
The first one should be the start point, the second should be the control point and the third
one should be the end point.ypoints - The Y coordinates for the curve.
The first one should be the start point, the second should be the control point and the third
one should be the end point.pointsOffset - The offset of the points in the xpoints and ypoints array.destX - Either an int[] or float[] object to hold the destination X points. Can be
null if you only are interested in the number of points that will be calculated.destY - Either an int[] or float[] object to hold the destination Y points. Can be
null if you only are interested in the number of points that will be calculated.offset - The offset into the destX and destY arrays for the points to go.options - No options are currently defined.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||