Path2D (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
abstract void
[append](../../../java/awt/geom/Path2D.html#append-java.awt.geom.PathIterator-boolean-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") pi, boolean connect)
Appends the geometry of the specifiedPathIterator object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
void
[append](../../../java/awt/geom/Path2D.html#append-java.awt.Shape-boolean-)([Shape](../../../java/awt/Shape.html "interface in java.awt") 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.
abstract [Object](../../../java/lang/Object.html "class in java.lang")
[clone](../../../java/awt/geom/Path2D.html#clone--)()
Creates a new object of the same class as this object.
void
[closePath](../../../java/awt/geom/Path2D.html#closePath--)()
Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo
.
boolean
[contains](../../../java/awt/geom/Path2D.html#contains-double-double-)(double x, double y)
Tests if the specified coordinates are inside the boundary of theShape
, as described by the definition of insideness.
boolean
[contains](../../../java/awt/geom/Path2D.html#contains-double-double-double-double-)(double x, double y, double w, double h)
Tests if the interior of the Shape
entirely contains the specified rectangular area.
static boolean
[contains](../../../java/awt/geom/Path2D.html#contains-java.awt.geom.PathIterator-double-double-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") pi, double x, double y)
Tests if the specified coordinates are inside the closed boundary of the specified PathIterator.
static boolean
[contains](../../../java/awt/geom/Path2D.html#contains-java.awt.geom.PathIterator-double-double-double-double-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") 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.
static boolean
[contains](../../../java/awt/geom/Path2D.html#contains-java.awt.geom.PathIterator-java.awt.geom.Point2D-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") pi,[Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p)
Tests if the specified Point2D is inside the closed boundary of the specified PathIterator.
static boolean
[contains](../../../java/awt/geom/Path2D.html#contains-java.awt.geom.PathIterator-java.awt.geom.Rectangle2D-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") pi,[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Tests if the specified Rectangle2D is entirely inside the closed boundary of the specified PathIterator.
boolean
[contains](../../../java/awt/geom/Path2D.html#contains-java.awt.geom.Point2D-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p)
boolean
[contains](../../../java/awt/geom/Path2D.html#contains-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Tests if the interior of the Shape
entirely contains the specified Rectangle2D
.
[Shape](../../../java/awt/Shape.html "interface in java.awt")
[createTransformedShape](../../../java/awt/geom/Path2D.html#createTransformedShape-java.awt.geom.AffineTransform-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at)
Returns a new Shape
representing a transformed version of this Path2D
.
abstract void
[curveTo](../../../java/awt/geom/Path2D.html#curveTo-double-double-double-double-double-double-)(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.
[Rectangle](../../../java/awt/Rectangle.html "class in java.awt")
[getBounds](../../../java/awt/geom/Path2D.html#getBounds--)()
Returns an integer Rectangle that completely encloses theShape
.
[Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom")
[getCurrentPoint](../../../java/awt/geom/Path2D.html#getCurrentPoint--)()
Returns the coordinates most recently added to the end of the path as a Point2D object.
[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")
[getPathIterator](../../../java/awt/geom/Path2D.html#getPathIterator-java.awt.geom.AffineTransform-double-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at, double flatness)
Returns an iterator object that iterates along the Shape
boundary and provides access to a flattened view of theShape
outline geometry.
int
[getWindingRule](../../../java/awt/geom/Path2D.html#getWindingRule--)()
Returns the fill style winding rule.
boolean
[intersects](../../../java/awt/geom/Path2D.html#intersects-double-double-double-double-)(double x, double y, double w, double h)
Tests if the interior of the Shape
intersects the interior of a specified rectangular area.
static boolean
[intersects](../../../java/awt/geom/Path2D.html#intersects-java.awt.geom.PathIterator-double-double-double-double-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") 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.
static boolean
[intersects](../../../java/awt/geom/Path2D.html#intersects-java.awt.geom.PathIterator-java.awt.geom.Rectangle2D-)([PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom") pi,[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Tests if the interior of the specified PathIterator intersects the interior of a specified Rectangle2D.
boolean
[intersects](../../../java/awt/geom/Path2D.html#intersects-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Tests if the interior of the Shape
intersects the interior of a specified Rectangle2D
.
abstract void
[lineTo](../../../java/awt/geom/Path2D.html#lineTo-double-double-)(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.
abstract void
[moveTo](../../../java/awt/geom/Path2D.html#moveTo-double-double-)(double x, double y)
Adds a point to the path by moving to the specified coordinates specified in double precision.
abstract void
[quadTo](../../../java/awt/geom/Path2D.html#quadTo-double-double-double-double-)(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.
void
[reset](../../../java/awt/geom/Path2D.html#reset--)()
Resets the path to empty.
void
[setWindingRule](../../../java/awt/geom/Path2D.html#setWindingRule-int-)(int rule)
Sets the winding rule for this path to the specified value.
abstract void
[transform](../../../java/awt/geom/Path2D.html#transform-java.awt.geom.AffineTransform-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at)
Transforms the geometry of this path using the specifiedAffineTransform.