public class EnhancedPath extends java.util.ArrayList<EnhancedPath.Segment> implements java.awt.Shape
The coordinates of a EnhancedPath.Segment can reference a formula or a modifier.
Modifier and Type | Class and Description |
---|---|
static class |
EnhancedPath.Segment
Defines a vertex (node) of the bezier path.
|
static class |
EnhancedPath.SegType |
Constructor and Description |
---|
EnhancedPath() |
Modifier and Type | Method and Description |
---|---|
void |
arcTo(java.lang.Object x1,
java.lang.Object y1,
java.lang.Object x2,
java.lang.Object y2,
java.lang.Object x3,
java.lang.Object y3,
java.lang.Object x4,
java.lang.Object y4)
(x1, y1) and (x2, y2) is defining the bounding
box of a ellipse.
|
void |
clockwiseArcTo(java.lang.Object x1,
java.lang.Object y1,
java.lang.Object x2,
java.lang.Object y2,
java.lang.Object x3,
java.lang.Object y3,
java.lang.Object x4,
java.lang.Object y4) |
void |
close()
Closes the current path segment.
|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
boolean |
contains(java.awt.geom.Point2D p) |
boolean |
contains(java.awt.geom.Rectangle2D r) |
void |
curveTo(java.lang.Object x1,
java.lang.Object y1,
java.lang.Object x2,
java.lang.Object y2,
java.lang.Object x3,
java.lang.Object y3)
Adds a cubic curve to the current path segment.
|
void |
ellipseTo(java.lang.Object x,
java.lang.Object y,
java.lang.Object w,
java.lang.Object h,
java.lang.Object t0,
java.lang.Object t1)
Draws a segment of an ellipse.
|
java.awt.Rectangle |
getBounds() |
java.awt.geom.Rectangle2D |
getBounds2D() |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at) |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness) |
int |
getWindingRule()
Gets winding rule for filling the bezier path.
|
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
intersects(java.awt.geom.Rectangle2D r) |
void |
invalidatePath()
This must be called after the EnhancedPath has been changed.
|
void |
lineTo(java.lang.Object x1,
java.lang.Object y1)
Adds a line to the current path segment.
|
void |
moveTo(java.lang.Object xm1,
java.lang.Object ym1)
Opens a new path segment at the specified position.
|
void |
quadrantXTo(java.lang.Object x,
java.lang.Object y) |
void |
quadrantYTo(java.lang.Object x,
java.lang.Object y) |
void |
quadTo(java.lang.Object x1,
java.lang.Object y1,
java.lang.Object x2,
java.lang.Object y2)
Adds a quadratic curve to the current path segment.
|
void |
setWindingRule(int newValue)
Sets winding rule for filling the bezier path.
|
java.awt.geom.Path2D.Double |
toGeneralPath()
Converts the EnhancedPath into a Path2D.Double.
|
void |
validatePath()
Recomputes the EnhancedPath, if it is invalid.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public boolean contains(double x, double y, double w, double h)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Point2D p)
contains
in interface java.awt.Shape
public boolean contains(double x, double y)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Rectangle2D r)
contains
in interface java.awt.Shape
public boolean intersects(java.awt.geom.Rectangle2D r)
intersects
in interface java.awt.Shape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
public void validatePath()
public void invalidatePath()
public java.awt.geom.Path2D.Double toGeneralPath()
public void moveTo(java.lang.Object xm1, java.lang.Object ym1)
public void lineTo(java.lang.Object x1, java.lang.Object y1)
public void close()
public void quadTo(java.lang.Object x1, java.lang.Object y1, java.lang.Object x2, java.lang.Object y2)
public void curveTo(java.lang.Object x1, java.lang.Object y1, java.lang.Object x2, java.lang.Object y2, java.lang.Object x3, java.lang.Object y3)
public void arcTo(java.lang.Object x1, java.lang.Object y1, java.lang.Object x2, java.lang.Object y2, java.lang.Object x3, java.lang.Object y3, java.lang.Object x4, java.lang.Object y4)
public void clockwiseArcTo(java.lang.Object x1, java.lang.Object y1, java.lang.Object x2, java.lang.Object y2, java.lang.Object x3, java.lang.Object y3, java.lang.Object x4, java.lang.Object y4)
public void ellipseTo(java.lang.Object x, java.lang.Object y, java.lang.Object w, java.lang.Object h, java.lang.Object t0, java.lang.Object t1)
public void quadrantXTo(java.lang.Object x, java.lang.Object y)
public void quadrantYTo(java.lang.Object x, java.lang.Object y)
public void setWindingRule(int newValue)
newValue
- Must be Path2D.Double.WIND_EVEN_ODD or Path2D.Double.WIND_NON_ZERO.public int getWindingRule()