Java java.awt.geom Path2D fields, constructors, methods, implement or subclass

Example usage for Java java.awt.geom Path2D fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt.geom Path2D.

The text is from its open source code.

Field

intWIND_EVEN_ODD
An even-odd winding rule for determining the interior of a path.
intWIND_NON_ZERO
A non-zero winding rule for determining the interior of a path.

Method

voidappend(float x, float y)
voidappend(double x, double y)
voidappend(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.
voidappend(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.
voidclosePath()
Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo .
booleancontains(Point2D p)
booleancontains(Rectangle2D r)

This method object may conservatively return false in cases where the specified rectangular area intersects a segment of the path, but that segment does not represent a boundary between the interior and exterior of the path.

booleancontains(PathIterator pi, Point2D p)
Tests if the specified Point2D is inside the closed boundary of the specified PathIterator .
booleancontains(double x, double y)
booleancontains(PathIterator pi, Rectangle2D r)
Tests if the specified Rectangle2D is entirely inside the closed boundary of the specified PathIterator .
voidcurveTo(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.
RectanglegetBounds()
PathIteratorgetPathIterator(AffineTransform at)
Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.
voidlineTo(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.
voidmoveTo(double x, double y)
Adds a point to the path by moving to the specified coordinates specified in double precision.
voidreset()
Resets the path to empty.
voidtransform(AffineTransform at)
Transforms the geometry of this path using the specified AffineTransform .