
Java Platform 1.2 Beta 4 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object  +java.awt.geom.QuadCurve2D
This class is only the abstract superclass for all objects which store a 2D quadratic curve segment. The actual storage representation of the coordinates is left to the subclass.
Inner Class Summary  
static  QuadCurve2D.Double
A quadratic parametric curve segment specified with double coordinates. 
static  QuadCurve2D.Float
A quadratic parametric curve segment specified with float coordinates. 
Constructor Summary  
QuadCurve2D()
This is an abstract class that cannot be instantiated directly. 
Method Summary  
Object  clone()
Creates a new object of the same class as this object. 
boolean  contains(double x,
double y,
double w,
double h)
Test if the interior of the Shape entirely contains the given set of rectangular coordinates. 
boolean  contains(double x,
double y)
Test if a given coordinate is inside the boundary of the shape. 
boolean  contains(Point2D p)
Test if a given Point is inside the boundary of the shape. 
boolean  contains(Rectangle2D r)
Test if the interior of the Shape entirely contains the given Rectangle. 
Rectangle  getBounds()
Return the bounding box of the shape. 
abstract Point2D  getCtrlPt()
Returns the control point. 
abstract double  getCtrlX()
Returns the X coordinate of the control point in double precision. 
abstract double  getCtrlY()
Returns the Y coordinate of the control point in double precision. 
double  getFlatness()
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this curve. 
static double  getFlatness(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints. 
static double  getFlatness(double[] coords,
int offset)
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index. 
double  getFlatnessSq()
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this curve. 
static double  getFlatnessSq(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints. 
static double  getFlatnessSq(double[] coords,
int offset)
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index. 
abstract Point2D  getP1()
Returns the start point. 
abstract Point2D  getP2()
Returns the end point. 
PathIterator  getPathIterator(AffineTransform at,
double flatness)
Return an iteration object that defines the boundary of the flattened shape. 
PathIterator  getPathIterator(AffineTransform at)
Return an iteration object that defines the boundary of the shape. 
abstract double  getX1()
Returns the X coordinate of the start point in double precision. 
abstract double  getX2()
Returns the X coordinate of the end point in double precision. 
abstract double  getY1()
Returns the Y coordinate of the start point in double precision. 
abstract double  getY2()
Returns the Y coordinate of the end point in double precision. 
boolean  intersects(double x,
double y,
double w,
double h)
Test if the Shape intersects the interior of a given set of rectangular coordinates. 
boolean  intersects(Rectangle2D r)
Test if the Shape intersects the interior of a given Rectangle. 
abstract void  setCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates. 
void  setCurve(double[] coords,
int offset)
Sets the location of the endpoints and controlpoints of this curve to the double coordinates at the specified offset in the specified array. 
void  setCurve(Point2D p1,
Point2D cp,
Point2D p2)
Sets the location of the endpoints and controlpoint of this curve to the specified Point coordinates. 
void  setCurve(Point2D[] pts,
int offset)
Sets the location of the endpoints and controlpoints of this curve to the coordinates of the Point objects at the specified offset in the specified array. 
void  setCurve(QuadCurve2D c)
Sets the location of the endpoints and controlpoint of this curve to the same as those in the specified QuadCurve. 
static int  solveQuadratic(double[] eqn)
Solve the quadratic whose coefficients are in the eqn array and place the noncomplex roots back into the array, returning the number of roots. 
static void  subdivide(double[] src,
int srcoff,
double[] left,
int leftoff,
double[] right,
int rightoff)
Subdivides the quadratic curve specified by the the coordinates stored in the src array at indices (srcoff) through (srcoff + 5) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices. 
static void  subdivide(QuadCurve2D src,
QuadCurve2D left,
QuadCurve2D right)
Subdivides the quadratic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters. 
void  subdivide(QuadCurve2D left,
QuadCurve2D right)
Subdivides this quadratic curve and stores the resulting two subdivided curves into the left and right curve parameters. 
Methods inherited from class java.lang.Object  
equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait 
Constructor Detail 
protected QuadCurve2D()
QuadCurve2D.Float
,
QuadCurve2D.Double
Method Detail 
public abstract double getX1()
public abstract double getY1()
public abstract Point2D getP1()
public abstract double getCtrlX()
public abstract double getCtrlY()
public abstract Point2D getCtrlPt()
public abstract double getX2()
public abstract double getY2()
public abstract Point2D getP2()
public abstract void setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
public void setCurve(double[] coords, int offset)
public void setCurve(Point2D p1, Point2D cp, Point2D p2)
public void setCurve(Point2D[] pts, int offset)
public void setCurve(QuadCurve2D c)
public static double getFlatnessSq(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
public static double getFlatness(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
public static double getFlatnessSq(double[] coords, int offset)
public static double getFlatness(double[] coords, int offset)
public double getFlatnessSq()
public double getFlatness()
public void subdivide(QuadCurve2D left, QuadCurve2D right)
left
 the quadratic curve object for storing for the left or
first half of the subdivided curve
right
 the quadratic curve object for storing for the right or
second half of the subdivided curvepublic static void subdivide(QuadCurve2D src, QuadCurve2D left, QuadCurve2D right)
src
 the quadratic curve to be subdivided
left
 the quadratic curve object for storing for the left or
first half of the subdivided curve
right
 the quadratic curve object for storing for the right or
second half of the subdivided curvepublic static void subdivide(double[] src, int srcoff, double[] left, int leftoff, double[] right, int rightoff)
src
 the array holding the coordinates for the source curve
srcoff
 the offset into the array of the beginning of the
the 6 source coordinates
left
 the array for storing the coordinates for the first
half of the subdivided curve
leftoff
 the offset into the array of the beginning of the
the 6 left coordinates
right
 the array for storing the coordinates for the second
half of the subdivided curve
rightoff
 the offset into the array of the beginning of the
the 6 right coordinatespublic static int solveQuadratic(double[] eqn)
public boolean contains(double x, double y)
public boolean contains(Point2D p)
public boolean intersects(double x, double y, double w, double h)
public boolean intersects(Rectangle2D r)
public boolean contains(double x, double y, double w, double h)
public boolean contains(Rectangle2D r)
public Rectangle getBounds()
public PathIterator getPathIterator(AffineTransform at)
public PathIterator getPathIterator(AffineTransform at, double flatness)
public Object clone()
Cloneable

Java Platform 1.2 Beta 4 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 