Example usage for Java android.graphics Path fields, constructors, methods, implement or subclass
The text is from its open source code.
Path() Create an empty path |
void | addArc(RectF oval, float startAngle, float sweepAngle) Add the specified arc to the path as a new contour. |
void | addCircle(float x, float y, float radius, Direction dir) Add a closed circle contour to the path |
void | addOval(RectF oval, Direction dir) Add a closed oval contour to the path |
void | addPath(Path src) Add a copy of src to the path |
void | addRect(float left, float top, float right, float bottom, Direction dir) Add a closed rectangle contour to the path |
void | addRect(RectF rect, Direction dir) Add a closed rectangle contour to the path |
void | addRoundRect(RectF rect, float rx, float ry, Direction dir) Add a closed round-rectangle contour to the path |
void | addRoundRect(RectF rect, float[] radii, Direction dir) Add a closed round-rectangle contour to the path. |
void | arcTo(RectF oval, float startAngle, float sweepAngle) Append the specified arc to the path as a new contour. |
void | close() Close the current contour. |
void | computeBounds(RectF bounds, boolean exact) Compute the bounds of the control points of the path, and write the answer into bounds. |
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). |
void | lineTo(float x, float y) Add a line from the last point to the specified point (x,y). |
void | moveTo(float x, float y) Set the beginning of the next contour to the point (x,y). |
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). |
void | rCubicTo(float x1, float y1, float x2, float y2, float x3, float y3) Same as cubicTo, but the coordinates are considered relative to the current point on this contour. |
void | reset() Clear any lines and curves from the path, making it empty. |
void | rewind() Rewinds the path: clears any lines and curves from the path but keeps the internal data structure for faster reuse. |
void | rLineTo(float dx, float dy) Same as lineTo, but the coordinates are considered relative to the last point on this contour. |
void | rMoveTo(float dx, float dy) Set the beginning of the next contour relative to the last point on the previous contour. |
void | set(@NonNull Path src) Replace the contents of this with the contents of src. |
void | setFillType(FillType ft) Set the path's fill type. |
void | transform(Matrix matrix) Transform the points in this path by matrix. |
void | transform(Matrix matrix, Path dst) Transform the points in this path by matrix, and write the answer into dst. |