14.03.2018 Views

AWT Tutorialspoint Simply Esay Learning

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>AWT</strong><br />

specified by the control points stored in the indicated array at the<br />

indicated index.<br />

static double getFlatnessSq(double x1, double y1, double ctrlx,<br />

double ctrly, double x2, double y2)<br />

15 Returns the square of the flatness, or maximum distance of a control<br />

point from the line connecting the end points, of the quadratic curve<br />

specified by the indicated control points.<br />

abstract Point2D getP1()<br />

16<br />

Returns the start point.<br />

abstract Point2D getP2()<br />

17<br />

Returns the end point.<br />

PathIterator getPathIterator(AffineTransform at)<br />

18 Returns an iteration object that defines the boundary of the shape of<br />

this QuadCurve2D.<br />

PathIterator getPathIterator(AffineTransform at, double<br />

flatness)<br />

19<br />

Returns an iteration object that defines the boundary of the flattened<br />

shape of this QuadCurve2D.<br />

abstract double getX1()<br />

20<br />

Returns the X coordinate of the start point in double in precision.<br />

abstract double getX2()<br />

21<br />

Returns the X coordinate of the end point in double precision.<br />

abstract double getY1()<br />

22<br />

Returns the Y coordinate of the start point in double precision.<br />

abstract double getY2()<br />

23<br />

Returns the Y coordinate of the end point in double precision.<br />

boolean intersects(double x, double y, double w, double h)<br />

24 Tests if the interior of the Shape intersects the interior of a specified<br />

rectangular area.<br />

boolean intersects(Rectangle2D r)<br />

25 Tests if the interior of the Shape intersects the interior of a specified<br />

Rectangle2D.<br />

void setCurve(double[] coords, int offset)<br />

Sets the location of the end points and control points of this<br />

26<br />

QuadCurve2D to the double coordinates at the specified offset in the<br />

specified array.<br />

abstract void setCurve(double x1, double y1, double ctrlx,<br />

double ctrly, double x2, double y2)<br />

27<br />

Sets the location of the end points and control point of this curve to the<br />

specified double coordinates.<br />

void setCurve(Point2D[] pts, int offset)<br />

Sets the location of the end points and control points of this<br />

28<br />

QuadCurve2D to the coordinates of the Point2D objects at the specified<br />

offset in the specified array.<br />

void setCurve(Point2D p1, Point2D cp, Point2D p2)<br />

29 Sets the location of the end points and control point of this<br />

QuadCurve2D to the specified Point2D coordinates.<br />

30 void setCurve(QuadCurve2D c)<br />

299

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!