public class CubicCurve extends AbstractCubicCurve implements Serializable
| Modifier and Type | Field and Description |
|---|---|
float |
ctrlx1
The x-coordinate of the first control point.
|
float |
ctrlx2
The x-coordinate of the second control point.
|
float |
ctrly1
The y-coordinate of the first control point.
|
float |
ctrly2
The x-coordinate of the second control point.
|
float |
x1
The x-coordinate of the start of this curve.
|
float |
x2
The x-coordinate of the end of this curve.
|
float |
y1
The y-coordinate of the start of this curve.
|
float |
y2
The y-coordinate of the end of this curve.
|
| Constructor and Description |
|---|
CubicCurve()
Creates a cubic curve with all points at (0,0).
|
CubicCurve(float x1,
float y1,
float ctrlx1,
float ctrly1,
float ctrlx2,
float ctrly2,
float x2,
float y2)
Creates a cubic curve with the specified start, control, and end points.
|
| Modifier and Type | Method and Description |
|---|---|
float |
ctrlX1()
Returns the x-coordinate of the first control point.
|
float |
ctrlX2()
Returns the x-coordinate of the second control point.
|
float |
ctrlY1()
Returns the y-coordinate of the first control point.
|
float |
ctrlY2()
Returns the y-coordinate of the second control point.
|
void |
setCurve(float[] coords,
int offset)
Configures the start, control and end points for this curve, using the values at the
specified offset in the
coords array. |
void |
setCurve(float x1,
float y1,
float ctrlx1,
float ctrly1,
float ctrlx2,
float ctrly2,
float x2,
float y2)
Configures the start, control and end points for this curve.
|
void |
setCurve(ICubicCurve curve)
Configures the start, control and end points for this curve to be the same as the supplied
curve.
|
void |
setCurve(XY[] points,
int offset)
Configures the start, control and end points for this curve, using the values at the
specified offset in the
points array. |
void |
setCurve(XY p1,
XY cp1,
XY cp2,
XY p2)
Configures the start, control and end points for this curve.
|
float |
x1()
Returns the x-coordinate of the start of this curve.
|
float |
x2()
Returns the x-coordinate of the end of this curve.
|
float |
y1()
Returns the y-coordinate of the start of this curve.
|
float |
y2()
Returns the y-coordinate of the end of this curve.
|
bounds, bounds, clone, contains, contains, contains, contains, ctrlP1, ctrlP2, flatness, flatnessSq, intersects, intersects, isEmpty, p1, p2, pathIterator, pathIterator, subdividepublic float x1
public float y1
public float ctrlx1
public float ctrly1
public float ctrlx2
public float ctrly2
public float x2
public float y2
public CubicCurve()
public CubicCurve(float x1,
float y1,
float ctrlx1,
float ctrly1,
float ctrlx2,
float ctrly2,
float x2,
float y2)
public void setCurve(float x1,
float y1,
float ctrlx1,
float ctrly1,
float ctrlx2,
float ctrly2,
float x2,
float y2)
public void setCurve(XY p1, XY cp1, XY cp2, XY p2)
public void setCurve(float[] coords,
int offset)
coords array.public void setCurve(XY[] points, int offset)
points array.public void setCurve(ICubicCurve curve)
public float x1()
ICubicCurvex1 in interface ICubicCurvepublic float y1()
ICubicCurvey1 in interface ICubicCurvepublic float ctrlX1()
ICubicCurvectrlX1 in interface ICubicCurvepublic float ctrlY1()
ICubicCurvectrlY1 in interface ICubicCurvepublic float ctrlX2()
ICubicCurvectrlX2 in interface ICubicCurvepublic float ctrlY2()
ICubicCurvectrlY2 in interface ICubicCurvepublic float x2()
ICubicCurvex2 in interface ICubicCurvepublic float y2()
ICubicCurvey2 in interface ICubicCurveCopyright © 2017. All rights reserved.