is new.
java.lang.Objectjava.awt.geom.QuadCurve2D
java.awt.geom.QuadCurve2D.Float
,
Serializable
,
Cloneable
public static class QuadCurve2D.Float
implements
SerializableA quadratic parametric curve segment specified with float 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 | |
|---|---|
| float |
ctrlx
The
X
|
| float |
ctrly
The
Y
|
| float |
x1
The
X
|
| float |
x2
The
X
|
| float |
y1
The
Y
|
| float |
y2
The
Y
|
| Constructor Summary | |
|---|---|
|
QuadCurve2D.Float
() Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0). |
|
|
QuadCurve2D.Float
(float x1, float y1, float ctrlx, float ctrly, float x2, float y2) Constructs and initializes a QuadCurve2D from the specified
float
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
curve
|
| void |
setCurve
(float x1, float y1, float ctrlx, float ctrly, float x2, float 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 float x1
X
Since:
1.2
public float y1
Y
Since:
1.2
public float ctrlx
X
Since:
1.2
public float ctrly
Y
Since:
1.2
public float x2
X
Since:
1.2
public float y2
Y
Since:
1.2
| Constructor Detail |
|---|
public QuadCurve2D.Float()
Since:
1.2
public QuadCurve2D.Float(float x1,
float y1,
float ctrlx,
float ctrly,
float x2,
float y2)
float
coordinates.
x1 - the X coordinate of the start point
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()
Point2D
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
coordiante
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
curve
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 void setCurve(float x1,
float y1,
float ctrlx,
float ctrly,
float x2,
float 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
Returns:
an instance of Rectangle2D that is a high-precision bounding box of the Shape.
Since:
1.2