public class QuadCurve extends AbstractQuadCurve implements Serializable
Modifier and Type | Field and Description |
---|---|
double |
ctrlx
The x-coordinate of the control point.
|
double |
ctrly
The y-coordinate of the control point.
|
double |
x1
The x-coordinate of the start of this curve.
|
double |
x2
The x-coordinate of the end of this curve.
|
double |
y1
The y-coordinate of the start of this curve.
|
double |
y2
The y-coordinate of the end of this curve.
|
Constructor and Description |
---|
QuadCurve()
Creates a quad curve with all points at (0,0).
|
QuadCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
Creates a quad curve with the specified start, control, and end points.
|
Modifier and Type | Method and Description |
---|---|
double |
ctrlX()
Returns the x-coordinate of the control point.
|
double |
ctrlY()
Returns the y-coordinate of the control point.
|
void |
setCurve(double[] 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(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
Configures the start, control, and end points for this curve.
|
void |
setCurve(IQuadCurve 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 cp,
XY p2)
Configures the start, control, and end points for this curve.
|
double |
x1()
Returns the x-coordinate of the start of this curve.
|
double |
x2()
Returns the x-coordinate of the end of this curve.
|
double |
y1()
Returns the y-coordinate of the start of this curve.
|
double |
y2()
Returns the y-coordinate of the end of this curve.
|
bounds, bounds, clone, contains, contains, contains, contains, ctrlP, flatness, flatnessSq, intersects, intersects, isEmpty, p1, p2, pathIterator, pathIterator, subdivide
public double x1
public double y1
public double ctrlx
public double ctrly
public double x2
public double y2
public QuadCurve()
public QuadCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
public void setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
public void setCurve(XY p1, XY cp, XY p2)
public void setCurve(double[] coords, int offset)
coords
array.public void setCurve(XY[] points, int offset)
points
array.public void setCurve(IQuadCurve curve)
public double x1()
IQuadCurve
x1
in interface IQuadCurve
public double y1()
IQuadCurve
y1
in interface IQuadCurve
public double ctrlX()
IQuadCurve
ctrlX
in interface IQuadCurve
public double ctrlY()
IQuadCurve
ctrlY
in interface IQuadCurve
public double x2()
IQuadCurve
x2
in interface IQuadCurve
public double y2()
IQuadCurve
y2
in interface IQuadCurve
Copyright © 2017. All rights reserved.