API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.geom. CubicCurve2D View Source
Author(s)
Jim Graham
Since
1.2
Version
1.35, 04/17/06
Serial
Hierarchy
 Object
      CubicCurve2D
Implements
 Shape
 Cloneable
Subclasses
Description
publicabstract abstract class CubicCurve2D
  The CubicCurve2D class defines a cubic parametric curve segment in (x,y) coordinate space.
See also:   
Constructors
protected CubicCurve2D ()
  This is an abstract class that cannot be instantiated directly.
Methods
Hide/Show inherited methods
public Object clone ()
  Creates a new object of the same class as this object.
public boolean contains (double x, double y) [Specified in Shape]
  Tests if the specified coordinates are inside the boundary of the Shape.
public boolean contains (double x, double y, double w, double h) [Specified in Shape]
  Tests if the interior of the Shape entirely contains the specified rectangular area.
public boolean contains (Point2D p) [Specified in Shape]
  Tests if a specified Point2D is inside the boundary of the Shape.
public boolean contains (Rectangle2D r) [Specified in Shape]
  Tests if the interior of the Shape entirely contains the specified Rectangle2D.
public Rectangle getBounds () [Specified in Shape]
  Returns an integer Rectangle that completely encloses the Shape.
publicabstract Point2D getCtrlP1 ()
  Returns the first control point.
publicabstract Point2D getCtrlP2 ()
  Returns the second control point.
publicabstract double getCtrlX1 ()
  Returns the X coordinate of the first control point in double precision.
publicabstract double getCtrlX2 ()
  Returns the X coordinate of the second control point in double precision.
publicabstract double getCtrlY1 ()
  Returns the Y coordinate of the first control point in double precision.
publicabstract double getCtrlY2 ()
  Returns the Y coordinate of the second control point in double precision.
public double getFlatness ()
  Returns the flatness of this curve.
publicstatic double getFlatness (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.
publicstatic double getFlatness (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.
public double getFlatnessSq ()
  Returns the square of the flatness of this curve.
publicstatic double getFlatnessSq (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.
publicstatic double getFlatnessSq (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.
publicabstract Point2D getP1 ()
  Returns the start point.
publicabstract Point2D getP2 ()
  Returns the end point.
public PathIterator getPathIterator (AffineTransform at) [Specified in Shape]
  Returns an iteration object that defines the boundary of the shape.
public PathIterator getPathIterator (AffineTransform at, double flatness) [Specified in Shape]
  Return an iteration object that defines the boundary of the flattened shape.
publicabstract double getX1 ()
  Returns the X coordinate of the start point in double precision.
publicabstract double getX2 ()
  Returns the X coordinate of the end point in double precision.
publicabstract double getY1 ()
  Returns the Y coordinate of the start point in double precision.
publicabstract double getY2 ()
  Returns the Y coordinate of the end point in double precision.
public boolean intersects (double x, double y, double w, double h) [Specified in Shape]
  Tests if the interior of the Shape intersects the interior of a specified rectangular area.
public boolean intersects (Rectangle2D r) [Specified in Shape]
  Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
public void setCurve (CubicCurve2D c)
  Sets the location of the end points and control points of this curve to the same as those in the specified CubicCurve2D.
public void setCurve (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.
publicabstract void setCurve (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.
public void setCurve (Point2D 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.
public void setCurve (Point2D p1, Point2D cp1, Point2D cp2, Point2D p2)
  Sets the location of the end points and control points of this curve to the specified Point2D coordinates.
publicstatic int solveCubic (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.
publicstatic int solveCubic (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.
public void subdivide (CubicCurve2D left, CubicCurve2D right)
  Subdivides this cubic curve and stores the resulting two subdivided curves into the left and right curve parameters.
publicstatic void subdivide (CubicCurve2D src, CubicCurve2D left, CubicCurve2D right)
  Subdivides the cubic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.
publicstatic void subdivide (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.
Fields
Hide/Show inherited fields
Nested Classes
  CubicCurve2D.Float
A cubic parametric curve segment specified with float coordinates.
  CubicCurve2D.Double
A cubic parametric curve segment specified with double coordinates.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar