CubicCurve2D (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

[Object](../../../java/lang/Object.html "class in java.lang")

[clone](../../../java/awt/geom/CubicCurve2D.html#clone--)()

Creates a new object of the same class as this object.

boolean

[contains](../../../java/awt/geom/CubicCurve2D.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/CubicCurve2D.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/CubicCurve2D.html#contains-java.awt.geom.Point2D-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p)

boolean

[contains](../../../java/awt/geom/CubicCurve2D.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/CubicCurve2D.html#getBounds--)()

Returns an integer Rectangle that completely encloses theShape.

abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")

[getCtrlP1](../../../java/awt/geom/CubicCurve2D.html#getCtrlP1--)()

Returns the first control point.

abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")

[getCtrlP2](../../../java/awt/geom/CubicCurve2D.html#getCtrlP2--)()

Returns the second control point.

abstract double

[getCtrlX1](../../../java/awt/geom/CubicCurve2D.html#getCtrlX1--)()

Returns the X coordinate of the first control point in double precision.

abstract double

[getCtrlX2](../../../java/awt/geom/CubicCurve2D.html#getCtrlX2--)()

Returns the X coordinate of the second control point in double precision.

abstract double

[getCtrlY1](../../../java/awt/geom/CubicCurve2D.html#getCtrlY1--)()

Returns the Y coordinate of the first control point in double precision.

abstract double

[getCtrlY2](../../../java/awt/geom/CubicCurve2D.html#getCtrlY2--)()

Returns the Y coordinate of the second control point in double precision.

double

[getFlatness](../../../java/awt/geom/CubicCurve2D.html#getFlatness--)()

Returns the flatness of this curve.

static double

[getFlatness](../../../java/awt/geom/CubicCurve2D.html#getFlatness-double:A-int-)(double[] coords, int offset)

Returns the flatness of the cubic curve specified by the control points stored in the indicated array at the indicated index.

static double

[getFlatness](../../../java/awt/geom/CubicCurve2D.html#getFlatness-double-double-double-double-double-double-double-double-)(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2)

Returns the flatness of the cubic curve specified by the indicated control points.

double

[getFlatnessSq](../../../java/awt/geom/CubicCurve2D.html#getFlatnessSq--)()

Returns the square of the flatness of this curve.

static double

[getFlatnessSq](../../../java/awt/geom/CubicCurve2D.html#getFlatnessSq-double:A-int-)(double[] coords, int offset)

Returns the square of the flatness of the cubic curve specified by the control points stored in the indicated array at the indicated index.

static double

[getFlatnessSq](../../../java/awt/geom/CubicCurve2D.html#getFlatnessSq-double-double-double-double-double-double-double-double-)(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2)

Returns the square of the flatness of the cubic curve specified by the indicated control points.

abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")

[getP1](../../../java/awt/geom/CubicCurve2D.html#getP1--)()

Returns the start point.

abstract [Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")

[getP2](../../../java/awt/geom/CubicCurve2D.html#getP2--)()

Returns the end point.

[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")

[getPathIterator](../../../java/awt/geom/CubicCurve2D.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.

[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")

[getPathIterator](../../../java/awt/geom/CubicCurve2D.html#getPathIterator-java.awt.geom.AffineTransform-double-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at, double flatness)

Return an iteration object that defines the boundary of the flattened shape.

abstract double

[getX1](../../../java/awt/geom/CubicCurve2D.html#getX1--)()

Returns the X coordinate of the start point in double precision.

abstract double

[getX2](../../../java/awt/geom/CubicCurve2D.html#getX2--)()

Returns the X coordinate of the end point in double precision.

abstract double

[getY1](../../../java/awt/geom/CubicCurve2D.html#getY1--)()

Returns the Y coordinate of the start point in double precision.

abstract double

[getY2](../../../java/awt/geom/CubicCurve2D.html#getY2--)()

Returns the Y coordinate of the end point in double precision.

boolean

[intersects](../../../java/awt/geom/CubicCurve2D.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/CubicCurve2D.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/CubicCurve2D.html#setCurve-java.awt.geom.CubicCurve2D-)([CubicCurve2D](../../../java/awt/geom/CubicCurve2D.html "class in java.awt.geom") c)

Sets the location of the end points and control points of this curve to the same as those in the specified CubicCurve2D.

void

[setCurve](../../../java/awt/geom/CubicCurve2D.html#setCurve-double:A-int-)(double[] coords, int offset)

Sets the location of the end points and control points of this curve to the double coordinates at the specified offset in the specified array.

abstract void

[setCurve](../../../java/awt/geom/CubicCurve2D.html#setCurve-double-double-double-double-double-double-double-double-)(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2)

Sets the location of the end points and control points of this curve to the specified double coordinates.

void

[setCurve](../../../java/awt/geom/CubicCurve2D.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 this curve to the coordinates of the Point2D objects at the specified offset in the specified array.

void

[setCurve](../../../java/awt/geom/CubicCurve2D.html#setCurve-java.awt.geom.Point2D-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") cp1,[Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") cp2,[Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p2)

Sets the location of the end points and control points of this curve to the specified Point2D coordinates.

static int

[solveCubic](../../../java/awt/geom/CubicCurve2D.html#solveCubic-double:A-)(double[] eqn)

Solves the cubic 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

[solveCubic](../../../java/awt/geom/CubicCurve2D.html#solveCubic-double:A-double:A-)(double[] eqn, double[] res)

Solve the cubic whose coefficients are in the eqn array and place the non-complex roots into the res array, returning the number of roots.

void

[subdivide](../../../java/awt/geom/CubicCurve2D.html#subdivide-java.awt.geom.CubicCurve2D-java.awt.geom.CubicCurve2D-)([CubicCurve2D](../../../java/awt/geom/CubicCurve2D.html "class in java.awt.geom") left,[CubicCurve2D](../../../java/awt/geom/CubicCurve2D.html "class in java.awt.geom") right)

Subdivides this cubic curve and stores the resulting two subdivided curves into the left and right curve parameters.

static void

[subdivide](../../../java/awt/geom/CubicCurve2D.html#subdivide-java.awt.geom.CubicCurve2D-java.awt.geom.CubicCurve2D-java.awt.geom.CubicCurve2D-)([CubicCurve2D](../../../java/awt/geom/CubicCurve2D.html "class in java.awt.geom") src,[CubicCurve2D](../../../java/awt/geom/CubicCurve2D.html "class in java.awt.geom") left,[CubicCurve2D](../../../java/awt/geom/CubicCurve2D.html "class in java.awt.geom") right)

Subdivides the cubic curve specified by the src parameter and stores the resulting two subdivided curves into theleft and right curve parameters.

static void

[subdivide](../../../java/awt/geom/CubicCurve2D.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 cubic curve specified by the coordinates stored in the src array at indices srcoff through (srcoff + 7) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.