public class CurvedPolyline extends AbstractShape
TODO: this is loosely based on my perception of how the Google Docs freehand shape tool works, but the magnitude of the tangents still requires some adjusting.
com.bric.plaf.CurvedPolylineCreationUI
| Modifier and Type | Class and Description |
|---|---|
static class |
CurvedPolyline
A path iterator based on a series of points.
|
| Modifier and Type | Field and Description |
|---|---|
protected List |
points
|
protected int |
windingRule
|
| Constructor and Description |
|---|
CurvedPolyline()
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(double x, double y)
Add a point to this shape.
|
void |
addPoint(Point2D
Add a point to this shape.
|
PathIterator |
getPathIterator(AffineTransform
Return a PathIterator representing this shape.
|
Point2D |
getPoint(int index)
Returns a specified point.
|
int |
getPointCount()
Return the number of points.
|
int |
getWindingRule()
|
boolean |
setPoint(int index, double x, double y)
Redefine an existing point.
|
boolean |
setWindingRule(int newWindingRule)
Set a winding rule.
|
String |
toString()
This expresses this shape as a series of points, written as "m [X] [Y] l [X] [Y] l [X] [Y] ..." Note that although this shape includes cubic data, it is expressed simply as points (linear data).
|
contains, contains, contains, contains, contains, contains, contains, contains, countCrossings, getBounds, getBounds, getBounds, getBounds2D, getBounds2D, getPathIterator, identifyCrossings, intersects, intersects, intersectspublic void addPoint(Point2Dp)
public void addPoint(double x,
double y)
public int getPointCount()
public Point2DgetPoint(int index)
public boolean setPoint(int index,
double x,
double y)
index - the index of the point to redefine.
x - the new x-coordinate.
y - the new y-coordinate.
public StringtoString()
public PathIteratorgetPathIterator(AffineTransform at)
public boolean setWindingRule(int newWindingRule)
newWindingRule -
PathIterator.WIND_EVEN_ODD or
PathIterator.WIND_NON_ZERO.
public int getWindingRule()