java.awt.geom
public static class QuadCurve2D.Double extends QuadCurve2D
QuadCurve2D.Float
QuadCurve2D.Double, QuadCurve2D.Float
Modifier and Type | Field and Description |
---|---|
double |
ctrlx
The x coordinate of the curve’s control point.
|
double |
ctrly
The y coordinate of the curve’s 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 |
---|
QuadCurve2D.Double()
Constructs a new QuadCurve2D that stores its coordinate values
in double-precision floating-point format.
|
QuadCurve2D.Double(double x1,
double y1,
double cx,
double cy,
double x2,
double y2)
Constructs a new QuadCurve2D 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 point.
|
Point2D |
getCtrlPt()
Returns the curve’s control point.
|
double |
getCtrlX()
Returns the x coordinate of the curve’s control
point.
|
double |
getCtrlY()
Returns the y coordinate of the curve’s 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 cx,
double cy,
double x2,
double y2)
Changes the geometry of the curve.
|
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveQuadratic, solveQuadratic, subdivide, subdivide, subdivide
public double x1
public double y1
public double ctrlx
public double ctrly
public double x2
public double y2
public QuadCurve2D.Double()
public QuadCurve2D.Double(double x1, double y1, double cx, double cy, double x2, double y2)
x1
- the x coordinate of the curve’s start
point.y1
- the y coordinate of the curve’s start
point.cx
- the x coordinate of the curve’s control
point.cy
- the y coordinate of the curve’s 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 QuadCurve2D
public double getY1()
getY1
in class QuadCurve2D
public Point2D getP1()
getP1
in class QuadCurve2D
public double getCtrlX()
getCtrlX
in class QuadCurve2D
public double getCtrlY()
getCtrlY
in class QuadCurve2D
public Point2D getCtrlPt()
getCtrlPt
in class QuadCurve2D
public double getX2()
getX2
in class QuadCurve2D
public double getY2()
getY2
in class QuadCurve2D
public Point2D getP2()
getP2
in class QuadCurve2D
public void setCurve(double x1, double y1, double cx, double cy, double x2, double y2)
setCurve
in class QuadCurve2D
x1
- the x coordinate of the curve’s new
start point.y1
- the y coordinate of the curve’s new
start point.cx
- the x coordinate of the curve’s new
control point.cy
- the y coordinate of the curve’s new
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()