Modifier and Type | Field and Description |
---|---|
static int |
WIND_EVEN_ODD
Specifies the even/odd rule for determining the interior of a path.
|
static int |
WIND_NON_ZERO
Specifies the non-zero rule for determining the interior of a path.
|
Constructor and Description |
---|
Path() |
Path(int rule) |
Path(int rule,
int initialCapacity) |
Path(IShape shape) |
Modifier and Type | Method and Description |
---|---|
void |
append(IShape shape,
boolean connect) |
void |
append(PathIterator path,
boolean connect) |
Rectangle |
bounds()
Returns a copy of the bounding rectangle for this shape.
|
Rectangle |
bounds(Rectangle target)
Initializes the supplied rectangle with this shape's bounding rectangle.
|
Path |
clone() |
void |
closePath() |
boolean |
contains(double px,
double py)
Returns true if this shape contains the specified point.
|
boolean |
contains(double rx,
double ry,
double rw,
double rh)
Returns true if this shape completely contains the specified rectangle.
|
boolean |
contains(IRectangle r)
Returns true if this shape completely contains the supplied rectangle.
|
boolean |
contains(XY p)
Returns true if this shape contains the supplied point.
|
IShape |
createTransformedShape(Transform t) |
Point |
currentPoint() |
void |
curveTo(double x1,
double y1,
double x2,
double y2,
double x3,
double y3) |
boolean |
intersects(double rx,
double ry,
double rw,
double rh)
Returns true if this shape intersects the specified rectangle.
|
boolean |
intersects(IRectangle r)
Returns true if this shape intersects the supplied rectangle.
|
boolean |
isEmpty()
Returns true if this shape encloses no area.
|
void |
lineTo(double x,
double y) |
void |
moveTo(double x,
double y) |
PathIterator |
pathIterator(Transform t)
Returns an iterator over the path described by this shape.
|
PathIterator |
pathIterator(Transform t,
double flatness)
Returns an iterator over the path described by this shape.
|
void |
quadTo(double x1,
double y1,
double x2,
double y2) |
void |
reset() |
void |
setWindingRule(int rule) |
void |
transform(Transform t) |
int |
windingRule() |
public static final int WIND_EVEN_ODD
public static final int WIND_NON_ZERO
public Path()
public Path(int rule)
public Path(int rule, int initialCapacity)
public Path(IShape shape)
public void setWindingRule(int rule)
public int windingRule()
public void moveTo(double x, double y)
public void lineTo(double x, double y)
public void quadTo(double x1, double y1, double x2, double y2)
public void curveTo(double x1, double y1, double x2, double y2, double x3, double y3)
public void closePath()
public void append(IShape shape, boolean connect)
public void append(PathIterator path, boolean connect)
public Point currentPoint()
public void reset()
public void transform(Transform t)
public Rectangle bounds()
IShape
public Rectangle bounds(Rectangle target)
IShape
public boolean isEmpty()
IShape
public boolean contains(double px, double py)
IShape
public boolean contains(double rx, double ry, double rw, double rh)
IShape
public boolean intersects(double rx, double ry, double rw, double rh)
IShape
intersects
in interface IShape
public boolean contains(XY p)
IShape
public boolean contains(IRectangle r)
IShape
public boolean intersects(IRectangle r)
IShape
intersects
in interface IShape
public PathIterator pathIterator(Transform t)
IShape
pathIterator
in interface IShape
t
- if supplied, the points in the path are transformed using this.public PathIterator pathIterator(Transform t, double flatness)
IShape
pathIterator
in interface IShape
t
- if supplied, the points in the path are transformed using this.flatness
- when approximating curved segments with lines, this controls the maximum
distance the lines are allowed to deviate from the approximated curve, thus a higher
flatness value generally allows for a path with fewer segments.Copyright © 2017. All rights reserved.