is new.
java.lang.Objectjava.awt.geom.QuadCurve2D
java.awt.geom.QuadCurve2D.Double
,
Serializable
,
Cloneable
public static class QuadCurve2D.Double
implements
SerializableA quadratic parametric curve segment specified with double coordinates.
Since:
1.2
See Also:
Serialized Form
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom. QuadCurve2D |
|---|
| QuadCurve2D.Double , QuadCurve2D.Float |
| Field Summary | |
|---|---|
| double |
ctrlx
The
X
|
| double |
ctrly
The
Y
|
| double |
x1
The
X
|
| double |
x2
The
X
|
| double |
y1
The
Y
|
| double |
y2
The
Y
|
| Constructor Summary | |
|---|---|
|
QuadCurve2D.Double
() Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0). |
|
|
QuadCurve2D.Double
(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Constructs and initializes a QuadCurve2D from the specified
double
coordinates. |
|
| Method Summary | |
|---|---|
| Rectangle2D |
getBounds2D
() Returns
a high precision and more accurate
the Shape than the getBounds method.
|
| Point2D |
getCtrlPt
() Returns the control point. |
| double |
getCtrlX
() Returns the
X
|
| double |
getCtrlY
() Returns the
Y
|
| Point2D |
getP1
() Returns the start point. |
| Point2D |
getP2
() Returns the end point. |
| double |
getX1
() Returns the
X
in
precision. |
| double |
getX2
() Returns the
X
|
| double |
getY1
() Returns the
Y
|
| double |
getY2
() Returns the
Y
|
| void |
setCurve
(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Sets the location of the
end points
control point
|
| Methods inherited from class java.awt.geom. QuadCurve2D |
|---|
| 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 |
| Methods inherited from class java.lang. Object |
|---|
| equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| Field Detail |
|---|
public double x1
X
Since:
1.2
public double y1
Y
Since:
1.2
public double ctrlx
X
Since:
1.2
public double ctrly
Y
Since:
1.2
public double x2
X
Since:
1.2
public double y2
Y
Since:
1.2
| Constructor Detail |
|---|
public QuadCurve2D.Double()
Since:
1.2
public QuadCurve2D.Double(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
double
coordinates.
x1
X coordinate
start
y1
Y coordinate
start
ctrlx - the X coordinate of the control point
ctrly - the Y coordinate of the control point
x2 - the X coordinate of the end point
y2 - the Y coordinate of the end point
Since:
1.2
| Method Detail |
|---|
public double getX1()
X
in
precision.
the X coordinate of the start point.
Since:
1.2
public double getY1()
Y
the Y coordinate of the start point.
Since:
1.2
public Point2D getP1()
start
Since:
1.2
public double getCtrlX()
X
X coordinate the control point
Since:
1.2
public double getCtrlY()
Y
the Y coordinate of the control point.
Since:
1.2
public Point2D getCtrlPt()
Point2D.
Since:
1.2
public double getX2()
X
Since:
1.2
public double getY2()
Y
the Y coordinate of the end point.
Since:
1.2
public Point2D getP2()
Point object
Point2D.
Since:
1.2
public void setCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
end points
control point
x1
X coordinate
start
y1
Y coordinate
start
ctrlx - the X coordinate of the control point
ctrly - the Y coordinate of the control point
x2 - the X coordinate of the end point
y2 - the Y coordinate of the end point
Since:
1.2
public Rectangle2D getBounds2D()
Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned
Rectangle2D
is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions.
Specified by:
getBounds2D
in interface
Shape
an instance of
a high-precision
Shape.
Since:
1.2