QuadCurve2D (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
[Object](../../../java/lang/Object.html "class in java.lang")
[clone](../../../java/awt/geom/QuadCurve2D.html#clone--)()
Creates a new object of the same class and with the same contents as this object.
boolean
[contains](../../../java/awt/geom/QuadCurve2D.html#contains-double-double-)(double x, double y)
Tests if the specified coordinates are inside the boundary of theShape
, as described by the definition of insideness.
boolean
[contains](../../../java/awt/geom/QuadCurve2D.html#contains-double-double-double-double-)(double x, double y, double w, double h)
Tests if the interior of the Shape
entirely contains the specified rectangular area.
boolean
[contains](../../../java/awt/geom/QuadCurve2D.html#contains-java.awt.geom.Point2D-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p)
boolean
[contains](../../../java/awt/geom/QuadCurve2D.html#contains-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Tests if the interior of the Shape
entirely contains the specified Rectangle2D
.
[Rectangle](../../../java/awt/Rectangle.html "class in java.awt")
[getBounds](../../../java/awt/geom/QuadCurve2D.html#getBounds--)()
Returns an integer Rectangle that completely encloses theShape
.
abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")
[getCtrlPt](../../../java/awt/geom/QuadCurve2D.html#getCtrlPt--)()
Returns the control point.
abstract double
[getCtrlX](../../../java/awt/geom/QuadCurve2D.html#getCtrlX--)()
Returns the X coordinate of the control point indouble
precision.
abstract double
[getCtrlY](../../../java/awt/geom/QuadCurve2D.html#getCtrlY--)()
Returns the Y coordinate of the control point indouble
precision.
double
[getFlatness](../../../java/awt/geom/QuadCurve2D.html#getFlatness--)()
Returns the flatness, or maximum distance of a control point from the line connecting the end points, of thisQuadCurve2D
.
static double
[getFlatness](../../../java/awt/geom/QuadCurve2D.html#getFlatness-double:A-int-)(double[] coords, int offset)
Returns the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the control points stored in the indicated array at the indicated index.
static double
[getFlatness](../../../java/awt/geom/QuadCurve2D.html#getFlatness-double-double-double-double-double-double-)(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Returns the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the indicated control points.
double
[getFlatnessSq](../../../java/awt/geom/QuadCurve2D.html#getFlatnessSq--)()
Returns the square of the flatness, or maximum distance of a control point from the line connecting the end points, of thisQuadCurve2D
.
static double
[getFlatnessSq](../../../java/awt/geom/QuadCurve2D.html#getFlatnessSq-double:A-int-)(double[] coords, int offset)
Returns the square of the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the control points stored in the indicated array at the indicated index.
static double
[getFlatnessSq](../../../java/awt/geom/QuadCurve2D.html#getFlatnessSq-double-double-double-double-double-double-)(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Returns the square of the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the indicated control points.
abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")
[getP1](../../../java/awt/geom/QuadCurve2D.html#getP1--)()
Returns the start point.
abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")
[getP2](../../../java/awt/geom/QuadCurve2D.html#getP2--)()
Returns the end point.
[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")
[getPathIterator](../../../java/awt/geom/QuadCurve2D.html#getPathIterator-java.awt.geom.AffineTransform-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at)
Returns an iteration object that defines the boundary of the shape of this QuadCurve2D
.
[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")
[getPathIterator](../../../java/awt/geom/QuadCurve2D.html#getPathIterator-java.awt.geom.AffineTransform-double-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at, double flatness)
Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D
.
abstract double
[getX1](../../../java/awt/geom/QuadCurve2D.html#getX1--)()
Returns the X coordinate of the start point indouble
in precision.
abstract double
[getX2](../../../java/awt/geom/QuadCurve2D.html#getX2--)()
Returns the X coordinate of the end point indouble
precision.
abstract double
[getY1](../../../java/awt/geom/QuadCurve2D.html#getY1--)()
Returns the Y coordinate of the start point indouble
precision.
abstract double
[getY2](../../../java/awt/geom/QuadCurve2D.html#getY2--)()
Returns the Y coordinate of the end point indouble
precision.
boolean
[intersects](../../../java/awt/geom/QuadCurve2D.html#intersects-double-double-double-double-)(double x, double y, double w, double h)
Tests if the interior of the Shape
intersects the interior of a specified rectangular area.
boolean
[intersects](../../../java/awt/geom/QuadCurve2D.html#intersects-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Tests if the interior of the Shape
intersects the interior of a specified Rectangle2D
.
void
[setCurve](../../../java/awt/geom/QuadCurve2D.html#setCurve-double:A-int-)(double[] coords, int offset)
Sets the location of the end points and control points of thisQuadCurve2D
to the double
coordinates at the specified offset in the specified array.
abstract void
[setCurve](../../../java/awt/geom/QuadCurve2D.html#setCurve-double-double-double-double-double-double-)(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Sets the location of the end points and control point of this curve to the specified double
coordinates.
void
[setCurve](../../../java/awt/geom/QuadCurve2D.html#setCurve-java.awt.geom.Point2D:A-int-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")[] pts, int offset)
Sets the location of the end points and control points of thisQuadCurve2D
to the coordinates of thePoint2D
objects at the specified offset in the specified array.
void
[setCurve](../../../java/awt/geom/QuadCurve2D.html#setCurve-java.awt.geom.Point2D-java.awt.geom.Point2D-java.awt.geom.Point2D-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p1,[Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") cp,[Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p2)
Sets the location of the end points and control point of thisQuadCurve2D
to the specified Point2D
coordinates.
void
[setCurve](../../../java/awt/geom/QuadCurve2D.html#setCurve-java.awt.geom.QuadCurve2D-)([QuadCurve2D](../../../java/awt/geom/QuadCurve2D.html "class in java.awt.geom") c)
Sets the location of the end points and control point of thisQuadCurve2D
to the same as those in the specifiedQuadCurve2D
.
static int
[solveQuadratic](../../../java/awt/geom/QuadCurve2D.html#solveQuadratic-double:A-)(double[] eqn)
Solves the quadratic whose coefficients are in the eqn
array and places the non-complex roots back into the same array, returning the number of roots.
static int
[solveQuadratic](../../../java/awt/geom/QuadCurve2D.html#solveQuadratic-double:A-double:A-)(double[] eqn, double[] res)
Solves the quadratic whose coefficients are in the eqn
array and places the non-complex roots into the res
array, returning the number of roots.
static void
[subdivide](../../../java/awt/geom/QuadCurve2D.html#subdivide-double:A-int-double:A-int-double:A-int-)(double[] src, int srcoff, double[] left, int leftoff, double[] right, int rightoff)
Subdivides the quadratic curve specified by the coordinates stored in the src
array at indicessrcoff
through srcoff
+ 5 and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.
void
[subdivide](../../../java/awt/geom/QuadCurve2D.html#subdivide-java.awt.geom.QuadCurve2D-java.awt.geom.QuadCurve2D-)([QuadCurve2D](../../../java/awt/geom/QuadCurve2D.html "class in java.awt.geom") left,[QuadCurve2D](../../../java/awt/geom/QuadCurve2D.html "class in java.awt.geom") right)
Subdivides this QuadCurve2D
and stores the resulting two subdivided curves into the left
andright
curve parameters.
static void
[subdivide](../../../java/awt/geom/QuadCurve2D.html#subdivide-java.awt.geom.QuadCurve2D-java.awt.geom.QuadCurve2D-java.awt.geom.QuadCurve2D-)([QuadCurve2D](../../../java/awt/geom/QuadCurve2D.html "class in java.awt.geom") src,[QuadCurve2D](../../../java/awt/geom/QuadCurve2D.html "class in java.awt.geom") left,[QuadCurve2D](../../../java/awt/geom/QuadCurve2D.html "class in java.awt.geom") right)
Subdivides the quadratic curve specified by the src
parameter and stores the resulting two subdivided curves into theleft
and right
curve parameters.