Companion

object Companion

Functions

Link copied to clipboard
fun Circle(centerX: Float, centerY: Float, radius: Float, direction: PathDirection = PathDirection.CLOCKWISE): Path

Creates a circular path.

Link copied to clipboard
fun convertConicToQuads(p0: Point, p1: Point, p2: Point, w: Float, pow2: Int): Array<Point>

Approximates conic with quad array. Conic is constructed from start Point p0, control Point p1, end Point p2, and weight w.

Link copied to clipboard
fun isCubicDegenerate(p1: Point, p2: Point, p3: Point, p4: Point, exact: Boolean): Boolean

Tests if cubic is degenerate.

Link copied to clipboard
fun isLineDegenerate(p1: Point, p2: Point, exact: Boolean): Boolean

Tests if line between Point pair is degenerate.

Link copied to clipboard
fun isQuadDegenerate(p1: Point, p2: Point, p3: Point, exact: Boolean): Boolean

Tests if quad is degenerate.

Link copied to clipboard
fun Line(p0: Point, p1: Point): Path

Creates a simple line path between two points.

Link copied to clipboard
fun makeCombining(one: Path, two: Path, op: PathOp): Path?

Returns Path that is the result of applying the Op to the first path and the second path.

Link copied to clipboard

Initializes Path from byte buffer. Throws exception if the buffer data is inconsistent, or the length is too small.

Link copied to clipboard
Link copied to clipboard
fun Oval(rect: Rect, direction: PathDirection = PathDirection.CLOCKWISE, startIndex: Int = 1): Path

Creates an oval path.

Link copied to clipboard
fun Polygon(pts: Array<Point>, isClosed: Boolean, fillType: PathFillMode = PathFillMode.WINDING, isVolatile: Boolean = false): Path

Creates a polygon path from an array of points.

Link copied to clipboard
fun Raw(pts: Array<Point>, verbs: Array<PathVerb>, conicWeights: FloatArray = FloatArray(0), fillType: PathFillMode = PathFillMode.WINDING, isVolatile: Boolean = false): Path

Creates a new path with the specified spans.

Link copied to clipboard
fun Rect(rect: Rect, fillType: PathFillMode = PathFillMode.WINDING, direction: PathDirection = PathDirection.CLOCKWISE, startIndex: Int = 0): Path

Creates a rectangular path.

Link copied to clipboard
fun RRect(rrect: RRect, direction: PathDirection = PathDirection.CLOCKWISE, startIndex: Int = if (direction == PathDirection.CLOCKWISE) 6 else 7): Path

Creates a rounded rectangle path.

fun RRect(bounds: Rect, rx: Float, ry: Float, direction: PathDirection = PathDirection.CLOCKWISE): Path

Creates a rounded rectangle path from bounds and corner radii.