| java.lang.Object java.awt.geom.Path2D java.awt.geom.GeneralPath
GeneralPath | final public class GeneralPath extends Path2D.Float (Code) | | The
GeneralPath class represents a geometric path
constructed from straight lines, and quadratic and cubic
(Bézier) curves. It can contain multiple subpaths.
GeneralPath is a legacy final class which exactly
implements the behavior of its superclass
Path2D.Float .
Together with
Path2D.Double , the
Path2D classes
provide full implementations of a general geometric path that
support all of the functionality of the
Shape and
PathIterator interfaces with the ability to explicitly
select different levels of internal coordinate precision.
Use
Path2D.Float (or this legacy
GeneralPath subclass) when dealing with data that can be represented
and used with floating point precision. Use
Path2D.Double for data that requires the accuracy or range of double precision.
version: 1.70, 05/05/07 author: Jim Graham since: 1.2 |
Constructor Summary | |
public | GeneralPath() Constructs a new empty single precision
GeneralPath object
with a default winding rule of
GeneralPath.WIND_NON_ZERO . | public | GeneralPath(int rule) Constructs a new GeneralPath object with the specified
winding rule to control operations that require the interior of the
path to be defined. | public | GeneralPath(int rule, int initialCapacity) Constructs a new GeneralPath object with the specified
winding rule and the specified initial capacity to store path
coordinates. | public | GeneralPath(Shape s) Constructs a new GeneralPath object from an arbitrary
Shape object. | | GeneralPath(int windingRule, byte[] pointTypes, int numTypes, float[] pointCoords, int numCoords) |
GeneralPath | public GeneralPath()(Code) | | Constructs a new empty single precision
GeneralPath object
with a default winding rule of
GeneralPath.WIND_NON_ZERO .
since: 1.2 |
GeneralPath | public GeneralPath(int rule)(Code) | | Constructs a new GeneralPath object with the specified
winding rule to control operations that require the interior of the
path to be defined.
Parameters: rule - the winding rule See Also: GeneralPath.WIND_EVEN_ODD See Also: GeneralPath.WIND_NON_ZERO since: 1.2 |
GeneralPath | public GeneralPath(int rule, int initialCapacity)(Code) | | Constructs a new GeneralPath object with the specified
winding rule and the specified initial capacity to store path
coordinates.
This number is an initial guess as to how many path segments
will be added to the path, but the storage is expanded as
needed to store whatever path segments are added.
Parameters: rule - the winding rule Parameters: initialCapacity - the estimate for the number of path segmentsin the path See Also: GeneralPath.WIND_EVEN_ODD See Also: GeneralPath.WIND_NON_ZERO since: 1.2 |
GeneralPath | public GeneralPath(Shape s)(Code) | | Constructs a new GeneralPath object from an arbitrary
Shape object.
All of the initial geometry and the winding rule for this path are
taken from the specified Shape object.
Parameters: s - the specified Shape object since: 1.2 |
GeneralPath | GeneralPath(int windingRule, byte[] pointTypes, int numTypes, float[] pointCoords, int numCoords)(Code) | | |
Methods inherited from java.awt.geom.Path2D | abstract void append(float x, float y)(Code)(Java Doc) abstract void append(double x, double y)(Code)(Java Doc) final public void append(Shape s, boolean connect)(Code)(Java Doc) abstract public void append(PathIterator pi, boolean connect)(Code)(Java Doc) abstract public Object clone()(Code)(Java Doc) abstract double[] cloneCoordsDouble(AffineTransform at)(Code)(Java Doc) abstract float[] cloneCoordsFloat(AffineTransform at)(Code)(Java Doc) final public synchronized void closePath()(Code)(Java Doc) public static boolean contains(PathIterator pi, double x, double y)(Code)(Java Doc) public static boolean contains(PathIterator pi, Point2D p)(Code)(Java Doc) final public boolean contains(double x, double y)(Code)(Java Doc) final public boolean contains(Point2D p)(Code)(Java Doc) public static boolean contains(PathIterator pi, double x, double y, double w, double h)(Code)(Java Doc) public static boolean contains(PathIterator pi, Rectangle2D r)(Code)(Java Doc) final public boolean contains(double x, double y, double w, double h)(Code)(Java Doc) final public boolean contains(Rectangle2D r)(Code)(Java Doc) final public synchronized Shape createTransformedShape(AffineTransform at)(Code)(Java Doc) abstract public void curveTo(double x1, double y1, double x2, double y2, double x3, double y3)(Code)(Java Doc) final public Rectangle getBounds()(Code)(Java Doc) final public synchronized Point2D getCurrentPoint()(Code)(Java Doc) public PathIterator getPathIterator(AffineTransform at, double flatness)(Code)(Java Doc) abstract Point2D getPoint(int coordindex)(Code)(Java Doc) final public synchronized int getWindingRule()(Code)(Java Doc) public static boolean intersects(PathIterator pi, double x, double y, double w, double h)(Code)(Java Doc) public static boolean intersects(PathIterator pi, Rectangle2D r)(Code)(Java Doc) final public boolean intersects(double x, double y, double w, double h)(Code)(Java Doc) final public boolean intersects(Rectangle2D r)(Code)(Java Doc) abstract public void lineTo(double x, double y)(Code)(Java Doc) abstract public void moveTo(double x, double y)(Code)(Java Doc) abstract void needRoom(boolean needMove, int newCoords)(Code)(Java Doc) abstract int pointCrossings(double px, double py)(Code)(Java Doc) abstract public void quadTo(double x1, double y1, double x2, double y2)(Code)(Java Doc) final void readObject(java.io.ObjectInputStream s, boolean storedbl) throws java.lang.ClassNotFoundException, java.io.IOException(Code)(Java Doc) abstract int rectCrossings(double rxmin, double rymin, double rxmax, double rymax)(Code)(Java Doc) final public synchronized void reset()(Code)(Java Doc) final public void setWindingRule(int rule)(Code)(Java Doc) abstract public void transform(AffineTransform at)(Code)(Java Doc) final void writeObject(java.io.ObjectOutputStream s, boolean isdbl) throws java.io.IOException(Code)(Java Doc)
|
|
|