java.awt.geom
public static class CubicCurve2D.Double extends CubicCurve2D
CubicCurve2D.Float
CubicCurve2D.Double, CubicCurve2D.Float
Modifier and Type | Field and Description |
---|---|
double |
ctrlx1
The x coordinate of the curve’s first control point.
|
double |
ctrlx2
The x coordinate of the curve’s second control point.
|
double |
ctrly1
The y coordinate of the curve’s first control point.
|
double |
ctrly2
The y coordinate of the curve’s second control point.
|
double |
x1
The x coordinate of the curve’s start point.
|
double |
x2
The x coordinate of the curve’s end point.
|
double |
y1
The y coordinate of the curve’s start point.
|
double |
y2
The y coordinate of the curve’s end point.
|
Constructor and Description |
---|
CubicCurve2D.Double()
Constructs a new CubicCurve2D that stores its coordinate values
in double-precision floating-point format.
|
CubicCurve2D.Double(double x1,
double y1,
double cx1,
double cy1,
double cx2,
double cy2,
double x2,
double y2)
Constructs a new CubicCurve2D that stores its coordinate values
in double-precision floating-point format, specifying the
initial position of each point.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getBounds2D()
Determines the smallest rectangle that encloses the
curve’s start, end and control points.
|
Point2D |
getCtrlP1()
Returns the curve’s first control point.
|
Point2D |
getCtrlP2()
Returns the curve’s second control point.
|
double |
getCtrlX1()
Returns the x coordinate of the curve’s first
control point.
|
double |
getCtrlX2()
Returns the x coordinate of the curve’s second
control point.
|
double |
getCtrlY1()
Returns the y coordinate of the curve’s first
control point.
|
double |
getCtrlY2()
Returns the y coordinate of the curve’s second
control point.
|
Point2D |
getP1()
Returns the curve’s start point.
|
Point2D |
getP2()
Returns the curve’s end point.
|
double |
getX1()
Returns the x coordinate of the curve’s start
point.
|
double |
getX2()
Returns the x coordinate of the curve’s end
point.
|
double |
getY1()
Returns the y coordinate of the curve’s start
point.
|
double |
getY2()
Returns the y coordinate of the curve’s end
point.
|
void |
setCurve(double x1,
double y1,
double cx1,
double cy1,
double cx2,
double cy2,
double x2,
double y2)
Changes the curve geometry, separately specifying each coordinate
value.
|
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveCubic, solveCubic, subdivide, subdivide, subdivide
public double x1
public double y1
public double ctrlx1
public double ctrly1
public double ctrlx2
public double ctrly2
public double x2
public double y2
public CubicCurve2D.Double()
public CubicCurve2D.Double(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)
x1
- the x coordinate of the curve’s start
point.y1
- the y coordinate of the curve’s start
point.cx1
- the x coordinate of the curve’s first
control point.cy1
- the y coordinate of the curve’s first
control point.cx2
- the x coordinate of the curve’s second
control point.cy2
- the y coordinate of the curve’s second
control point.x2
- the x coordinate of the curve’s end
point.y2
- the y coordinate of the curve’s end
point.public double getX1()
getX1
in class CubicCurve2D
public double getY1()
getY1
in class CubicCurve2D
public Point2D getP1()
getP1
in class CubicCurve2D
public double getCtrlX1()
getCtrlX1
in class CubicCurve2D
public double getCtrlY1()
getCtrlY1
in class CubicCurve2D
public Point2D getCtrlP1()
getCtrlP1
in class CubicCurve2D
public double getCtrlX2()
getCtrlX2
in class CubicCurve2D
public double getCtrlY2()
getCtrlY2
in class CubicCurve2D
public Point2D getCtrlP2()
getCtrlP2
in class CubicCurve2D
public double getX2()
getX2
in class CubicCurve2D
public double getY2()
getY2
in class CubicCurve2D
public Point2D getP2()
getP2
in class CubicCurve2D
public void setCurve(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)
setCurve
in class CubicCurve2D
x1
- the x coordinate of the curve’s new start
point.y1
- the y coordinate of the curve’s new start
point.cx1
- the x coordinate of the curve’s new
first control point.cy1
- the y coordinate of the curve’s new
first control point.cx2
- the x coordinate of the curve’s new
second control point.cy2
- the y coordinate of the curve’s new
second control point.x2
- the x coordinate of the curve’s new end
point.y2
- the y coordinate of the curve’s new end
point.public Rectangle2D getBounds2D()
Shape.getBounds()