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(float px,
float py)
Returns true if this shape contains the specified point.
|
boolean |
contains(float rx,
float ry,
float rw,
float 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(float x1,
float y1,
float x2,
float y2,
float x3,
float y3) |
boolean |
intersects(float rx,
float ry,
float rw,
float 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(float x,
float y) |
void |
moveTo(float x,
float y) |
PathIterator |
pathIterator(Transform t)
Returns an iterator over the path described by this shape.
|
PathIterator |
pathIterator(Transform t,
float flatness)
Returns an iterator over the path described by this shape.
|
void |
quadTo(float x1,
float y1,
float x2,
float 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(float x, float y)
public void lineTo(float x, float y)
public void quadTo(float x1, float y1, float x2, float y2)
public void curveTo(float x1, float y1, float x2, float y2, float x3, float 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(float px, float py)
IShape
public boolean contains(float rx, float ry, float rw, float rh)
IShape
public boolean intersects(float rx, float ry, float rw, float 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, float 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.