Java android.graphics Path fields, constructors, methods, implement or subclass

Example usage for Java android.graphics Path fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.graphics Path.

The text is from its open source code.

Constructor

Path()
Create an empty path

Method

voidaddArc(RectF oval, float startAngle, float sweepAngle)
Add the specified arc to the path as a new contour.
voidaddCircle(float x, float y, float radius, Direction dir)
Add a closed circle contour to the path
voidaddOval(RectF oval, Direction dir)
Add a closed oval contour to the path
voidaddPath(Path src)
Add a copy of src to the path
voidaddRect(float left, float top, float right, float bottom, Direction dir)
Add a closed rectangle contour to the path
voidaddRect(RectF rect, Direction dir)
Add a closed rectangle contour to the path
voidaddRoundRect(RectF rect, float rx, float ry, Direction dir)
Add a closed round-rectangle contour to the path
voidaddRoundRect(RectF rect, float[] radii, Direction dir)
Add a closed round-rectangle contour to the path.
voidarcTo(RectF oval, float startAngle, float sweepAngle)
Append the specified arc to the path as a new contour.
voidclose()
Close the current contour.
voidcomputeBounds(RectF bounds, boolean exact)
Compute the bounds of the control points of the path, and write the answer into bounds.
voidcubicTo(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).
voidlineTo(float x, float y)
Add a line from the last point to the specified point (x,y).
voidmoveTo(float x, float y)
Set the beginning of the next contour to the point (x,y).
voidquadTo(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).
voidrCubicTo(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.
voidreset()
Clear any lines and curves from the path, making it empty.
voidrewind()
Rewinds the path: clears any lines and curves from the path but keeps the internal data structure for faster reuse.
voidrLineTo(float dx, float dy)
Same as lineTo, but the coordinates are considered relative to the last point on this contour.
voidrMoveTo(float dx, float dy)
Set the beginning of the next contour relative to the last point on the previous contour.
voidset(@NonNull Path src)
Replace the contents of this with the contents of src.
voidsetFillType(FillType ft)
Set the path's fill type.
voidtransform(Matrix matrix)
Transform the points in this path by matrix.
voidtransform(Matrix matrix, Path dst)
Transform the points in this path by matrix, and write the answer into dst.