API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.geom. Path2D View Source
Author(s)
Jim Graham
Since
1.6
Version
1.4, 04/19/06
Serial
Hierarchy
 Object
      Path2D
Implements
 Shape
 Cloneable
Subclasses
Description
publicabstract abstract class Path2D
  The Path2D class provides a simple, yet flexible shape which represents an arbitrary geometric path.
See also:   
Constructors
pack-private Path2D ()
  Constructs a new empty Path2D object.
pack-private Path2D (int rule, int initialTypes)
  Constructs a new Path2D object from the given specified initial values.
Methods
Hide/Show inherited methods
pack-privateabstract void append (double x, double y)
pack-privateabstract void append (float x, float y)
publicabstract void append (PathIterator pi, boolean connect)
  Appends the geometry of the specified PathIterator object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
publicfinal void append (Shape s, boolean connect)
  Appends the geometry of the specified Shape object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
publicabstract Object clone ()
  Creates a new object of the same class as this object.
pack-privateabstract double cloneCoordsDouble (AffineTransform at)
pack-privateabstract float cloneCoordsFloat (AffineTransform at)
publicfinalsynchronized void closePath ()
  Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo.
publicfinal boolean contains (double x, double y) [Specified in Shape]
  Tests if the specified coordinates are inside the boundary of the Shape.
publicfinal 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.
publicstatic boolean contains (PathIterator pi, double x, double y)
  Tests if the specified coordinates are inside the closed boundary of the specified PathIterator.
publicstatic boolean contains (PathIterator pi, double x, double y, double w, double h)
  Tests if the specified rectangular area is entirely inside the closed boundary of the specified PathIterator.
publicstatic boolean contains (PathIterator pi, Point2D p)
  Tests if the specified Point2D is inside the closed boundary of the specified PathIterator.
publicstatic boolean contains (PathIterator pi, Rectangle2D r)
  Tests if the specified Rectangle2D is entirely inside the closed boundary of the specified PathIterator.
publicfinal boolean contains (Point2D p) [Specified in Shape]
  Tests if a specified Point2D is inside the boundary of the Shape.
publicfinal boolean contains (Rectangle2D r) [Specified in Shape]
  Tests if the interior of the Shape entirely contains the specified Rectangle2D.
publicfinalsynchronized Shape createTransformedShape (AffineTransform at)
  Returns a new Shape representing a transformed version of this Path2D.
publicabstract void curveTo (double x1, double y1, double x2, double y2, double x3, double y3)
  Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates (x3,y3), using the specified points (x1,y1) and (x2,y2) as Bézier control points.
publicfinal Rectangle getBounds () [Specified in Shape]
  Returns an integer Rectangle that completely encloses the Shape.
publicfinalsynchronized Point2D getCurrentPoint ()
  Returns the coordinates most recently added to the end of the path as a Point2D object.
public PathIterator getPathIterator (AffineTransform at, double flatness) [Specified in Shape]
  Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.
pack-privateabstract Point2D getPoint (int coordindex)
publicfinalsynchronized int getWindingRule ()
  Returns the fill style winding rule.
publicfinal 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.
publicstatic boolean intersects (PathIterator pi, double x, double y, double w, double h)
  Tests if the interior of the specified PathIterator intersects the interior of a specified set of rectangular coordinates.
publicstatic boolean intersects (PathIterator pi, Rectangle2D r)
  Tests if the interior of the specified PathIterator intersects the interior of a specified Rectangle2D.
publicfinal boolean intersects (Rectangle2D r) [Specified in Shape]
  Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
publicabstract void lineTo (double x, double y)
  Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.
publicabstract void moveTo (double x, double y)
  Adds a point to the path by moving to the specified coordinates specified in double precision.
pack-privateabstract void needRoom (boolean needMove, int newCoords)
pack-privateabstract int pointCrossings (double px, double py)
publicabstract void quadTo (double x1, double y1, double x2, double y2)
  Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates (x2,y2), using the specified point (x1,y1) as a quadratic parametric control point.
pack-privatefinal void readObject (ObjectInputStream s, boolean storedbl) throws ClassNotFoundException IOException
pack-privateabstract int rectCrossings (double rxmin, double rymin, double rxmax, double rymax)
publicfinalsynchronized void reset ()
  Resets the path to empty.
publicfinal void setWindingRule (int rule)
  Sets the winding rule for this path to the specified value.
publicabstract void transform (AffineTransform at)
  Transforms the geometry of this path using the specified AffineTransform.
pack-privatefinal void writeObject (ObjectOutputStream s, boolean isdbl) throws IOException
Fields
Hide/Show inherited fields
pack-privatefinalstatic int EXPAND_MAX = "500"
pack-privatefinalstatic int INIT_SIZE = "20"
pack-privatetransient int numCoords
pack-privatetransient int numTypes
pack-privatetransient byte pointTypes
publicfinalstatic int WIND_EVEN_ODD = "0"
  An even-odd winding rule for determining the interior of a path.
publicfinalstatic int WIND_NON_ZERO = "1"
  A non-zero winding rule for determining the interior of a path.
pack-privatetransient int windingRule
Nested Classes
  Path2D.Float
The Float class defines a geometric path with coordinates stored in single precision floating point.
  Path2D.Double
The Double class defines a geometric path with coordinates stored in double precision floating point.
  Path2D.Iterator
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar