Path

class Path(canvas: Canvas)

Creates paths, and manipulates path data.

class Path(canvas: Canvas)
class Path(canvas: Canvas)

Parameters

canvas

The canvas used by Path.

canvas

The canvas used by Path.

canvas

The canvas used by Path.

Constructors

Path
Link copied to clipboard
fun Path(canvas: Canvas)
The canvas used by Path.
fun Path(canvas: Canvas)
fun Path(canvas: Canvas)

Functions

arc
Link copied to clipboard
common
fun arc(xCenterPos: Double, yCenterPos: Double, radius: Double, angle1: Double, angle2: Double)
Adds a circular arc of the given radius to the current path.
fun arc(xCenterPos: Double, yCenterPos: Double, radius: Double, angle1: Double, angle2: Double)
fun arc(xCenterPos: Double, yCenterPos: Double, radius: Double, angle1: Double, angle2: Double)
arcNegative
Link copied to clipboard
common
fun arcNegative(xCenterPos: Double, yCenterPos: Double, radius: Double, angle1: Double, angle2: Double)
Adds a circular arc of the given radius to the current path.
fun arcNegative(xCenterPos: Double, yCenterPos: Double, radius: Double, angle1: Double, angle2: Double)
fun arcNegative(xCenterPos: Double, yCenterPos: Double, radius: Double, angle1: Double, angle2: Double)
closePath
Link copied to clipboard
common
fun closePath()
Adds a line segment to the path from the current point to the beginning of the current sub-path, (the most recent point passed to moveTo), and closes this sub-path.
fun closePath()
fun closePath()
curveTo
Link copied to clipboard
common
fun curveTo(x1: Double, y1: Double, y2: Double, x2: Double, x3: Double, y3: Double)
Adds a cubic Bézier spline to the path from the current point to position (x3, y3) in user-space coordinates, using (x1, y1) and (x2, y2) as the control points.
fun curveTo(x1: Double, y1: Double, y2: Double, x2: Double, x3: Double, y3: Double)
fun curveTo(x1: Double, y1: Double, y2: Double, x2: Double, x3: Double, y3: Double)
fetchCurrentPoint
Link copied to clipboard
common
fun fetchCurrentPoint(): Pair<Double, Double>
Gets the current point of the current path, which is conceptually the final point reached by the path so far.
fun fetchCurrentPoint(): Pair<Double, Double>
fun fetchCurrentPoint(): Pair<Double, Double>
lineTo
Link copied to clipboard
common
fun lineTo(xPos: Double, yPos: Double)
Adds a line to the path from the current point to position (xPos, yPos) in user-space coordinates.
fun lineTo(xPos: Double, yPos: Double)
fun lineTo(xPos: Double, yPos: Double)
moveTo
Link copied to clipboard
common
fun moveTo(xPos: Double, yPos: Double)
Begin a new sub-path.
fun moveTo(xPos: Double, yPos: Double)
fun moveTo(xPos: Double, yPos: Double)
newPath
Link copied to clipboard
common
fun newPath()
Clears the current path.
fun newPath()
fun newPath()
newSubPath
Link copied to clipboard
common
fun newSubPath()
Begin a new sub-path.
fun newSubPath()
fun newSubPath()
rectangle
Link copied to clipboard
common
fun rectangle(xPos: Double, yPos: Double, width: Double, height: Double)
Adds a closed sub-path rectangle of the given size to the current path at position (xPos, yPos) in user-space coordinates.
fun rectangle(xPos: Double, yPos: Double, width: Double, height: Double)
fun rectangle(xPos: Double, yPos: Double, width: Double, height: Double)

Properties

canvas
Link copied to clipboard
linuxArm32
val canvas: Canvas
canvas
Link copied to clipboard
linuxX64
val canvas: Canvas
hasCurrentPoint
Link copied to clipboard
val hasCurrentPoint: Boolean
Whether a current point is defined on the current path.
val hasCurrentPoint: Boolean
val hasCurrentPoint: Boolean