public class SpenPath extends Object
| Constructor and Description |
|---|
SpenPath()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOval(float left,
float top,
float right,
float bottom)
Append a closed oval contour to the path.
|
void |
addOval(RectF oval)
Append a closed oval contour to the path.
|
void |
arcTo(float left,
float top,
float right,
float bottom,
float startAngle,
float sweepAngle)
Append the specified arc to the path as a new contour.
|
void |
arcTo(RectF oval,
float startAngle,
float sweepAngle)
Append the specified arc to the path as a new contour.
|
void |
clear()
Clear any lines and curves from the path, making it empty.
|
void |
close()
Close the current contour.
|
void |
copy(SpenPath source)
Copy lines and curves from the specified path.
|
Path |
copyToAndroidPath()
Get the current path by Android Path class.
|
void |
cubicTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Add a cubic bezier from the last point, approaching control points (x1,y1) and (x2,y2), and ending at (x3,y3).
|
boolean |
equals(Object o)
Check if the specified path is the same as the current path.
|
void |
lineTo(float x,
float y)
Add a line from the last point to the specified point.
|
void |
moveTo(float x,
float y)
Set the beginning of the next contour to the point.
|
void |
quadTo(float x1,
float y1,
float x2,
float y2)
Add a quadratic bezier from the last point, approaching control point (x1,y1), and ending at (x2,y2).
|
public void lineTo(float x,
float y)
x - The x-coordinate of the end of a line.y - The y-coordinate of the end of a line.public void moveTo(float x,
float y)
x - The x-coordinate of the start of a new contour.y - The y-coordinate of the start of a new contour.public void cubicTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
x1 - The x-coordinate of the 1st control point on a cubic curvey1 - The y-coordinate of the 1st control point on a cubic curvex2 - The x-coordinate of the 2nd control point on a cubic curvey2 - The y-coordinate of the 2nd control point on a cubic curvex3 - The x-coordinate of the end point on a cubic curvey3 - The y-coordinate of the end point on a cubic curvepublic void quadTo(float x1,
float y1,
float x2,
float y2)
x1 - The x-coordinate of the control point on a quadratic curvey1 - The y-coordinate of the control point on a quadratic curvex2 - The x-coordinate of the end point on a quadratic curvey2 - The y-coordinate of the end point on a quadratic curvepublic void arcTo(float left,
float top,
float right,
float bottom,
float startAngle,
float sweepAngle)
left - The left side of a rectangle of the arc.top - The top side of a rectangle of the arc.right - The right side of a rectangle of arc.bottom - The bottom side of a rectangle of arc.startAngle - Starting angle (in degrees) where the arc beginssweepAngle - Sweep angle (in degrees) measured clockwisepublic void arcTo(RectF oval, float startAngle, float sweepAngle)
oval - The rectangle of the arc.startAngle - Starting angle (in degrees) where the arc beginssweepAngle - Sweep angle (in degrees) measured clockwiseNullPointerException - If the oval is null.public void close()
public void addOval(float left,
float top,
float right,
float bottom)
left - The left side of a rectangle of the oval.top - The top side of a rectangle of the oval.right - The right side of a rectangle of oval.bottom - The bottom side of a rectangle of oval.public void addOval(RectF oval)
oval - The rectangle of the oval.NullPointerException - If the oval is null.public void clear()
public void copy(SpenPath source)
source - The source path.IllegalArgumentException - If source is null.public Path copyToAndroidPath()