Path2D

JS
1.1
open class Path2D : CanvasPath
(source)

Exposes the JavaScript Path2D to Kotlin

Constructors

JS
1.1

<init>

Path2D(path: Path2D)
Path2D(
    paths: Array<Path2D>,
    fillRule: CanvasFillRule = definedExternally)
Path2D(d: String)

Exposes the JavaScript Path2D to Kotlin

Path2D()

Functions

JS
1.1

addPath

fun addPath(
    path: Path2D,
    transform: dynamic = definedExternally)
JS
1.1

arc

open fun arc(
    x: Double,
    y: Double,
    radius: Double,
    startAngle: Double,
    endAngle: Double,
    anticlockwise: Boolean)
JS
1.1

arcTo

open fun arcTo(
    x1: Double,
    y1: Double,
    x2: Double,
    y2: Double,
    radius: Double)
open fun arcTo(
    x1: Double,
    y1: Double,
    x2: Double,
    y2: Double,
    radiusX: Double,
    radiusY: Double,
    rotation: Double)
JS
1.1

bezierCurveTo

open fun bezierCurveTo(
    cp1x: Double,
    cp1y: Double,
    cp2x: Double,
    cp2y: Double,
    x: Double,
    y: Double)
JS
1.1

closePath

open fun closePath()
JS
1.1

ellipse

open fun ellipse(
    x: Double,
    y: Double,
    radiusX: Double,
    radiusY: Double,
    rotation: Double,
    startAngle: Double,
    endAngle: Double,
    anticlockwise: Boolean)
JS
1.1

lineTo

open fun lineTo(x: Double, y: Double)
JS
1.1

moveTo

open fun moveTo(x: Double, y: Double)
JS
1.1

quadraticCurveTo

open fun quadraticCurveTo(
    cpx: Double,
    cpy: Double,
    x: Double,
    y: Double)
JS
1.1

rect

open fun rect(x: Double, y: Double, w: Double, h: Double)