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

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

Introduction

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

The text is from its open source code.

Constructor

GeneralPath()
Constructs a new empty single precision GeneralPath object with a default winding rule of #WIND_NON_ZERO .
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.
GeneralPath(Shape s)
Constructs a new GeneralPath object from an arbitrary Shape object.
GeneralPath(int rule, int initialCapacity)
Constructs a new GeneralPath object with the specified winding rule and the specified initial capacity to store path coordinates.

Method

voidappend(float x, float y)
Objectclone()
Creates a new object of the same class as this object.
voidclosePath()
Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo .
booleancontains(PathIterator pi, Point2D p)
Tests if the specified Point2D is inside the closed boundary of the specified PathIterator .
ShapecreateTransformedShape(AffineTransform at)
Returns a new Shape representing a transformed version of this Path2D .
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()
Rectangle2DgetBounds2D()
Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
Point2DgetCurrentPoint()
Returns the coordinates most recently added to the end of the path as a Point2D object.
PathIteratorgetPathIterator(AffineTransform at)
Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.
PathIteratorgetPathIterator(AffineTransform at, double flatness)

The iterator for this class is not multi-threaded safe, which means that this Path2D class does not guarantee that modifications to the geometry of this Path2D object do not affect any iterations of that geometry that are already in process.

intgetWindingRule()
Returns the fill style winding rule.
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.
voidquadTo(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.
voidreset()
Resets the path to empty.
voidsetWindingRule(int rule)
Sets the winding rule for this path to the specified value.
voidtransform(AffineTransform at)
Transforms the geometry of this path using the specified AffineTransform .