CanvasPath

external interface CanvasPath (source)

Platform and version requirements: JS

Functions

arc

abstract fun arc(
    x: Double,
    y: Double,
    radius: Double,
    startAngle: Double,
    endAngle: Double,
    anticlockwise: Boolean = definedExternally)

arcTo

abstract fun arcTo(
    x1: Double,
    y1: Double,
    x2: Double,
    y2: Double,
    radius: Double)
abstract fun arcTo(
    x1: Double,
    y1: Double,
    x2: Double,
    y2: Double,
    radiusX: Double,
    radiusY: Double,
    rotation: Double)

bezierCurveTo

abstract fun bezierCurveTo(
    cp1x: Double,
    cp1y: Double,
    cp2x: Double,
    cp2y: Double,
    x: Double,
    y: Double)

closePath

abstract fun closePath()

ellipse

abstract fun ellipse(
    x: Double,
    y: Double,
    radiusX: Double,
    radiusY: Double,
    rotation: Double,
    startAngle: Double,
    endAngle: Double,
    anticlockwise: Boolean = definedExternally)

lineTo

abstract fun lineTo(x: Double, y: Double)

moveTo

abstract fun moveTo(x: Double, y: Double)

quadraticCurveTo

abstract fun quadraticCurveTo(
    cpx: Double,
    cpy: Double,
    x: Double,
    y: Double)

rect

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

Inherited Functions

equals

open operator fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:

hashCode

open fun hashCode(): Int

Returns a hash code value for the object. The general contract of hashCode is:

toString

open fun toString(): String

Returns a string representation of the object.

Inheritors

CanvasRenderingContext2D

abstract external class CanvasRenderingContext2D : 
    CanvasState,
    CanvasTransform,
    CanvasCompositing,
    CanvasImageSmoothing,
    CanvasFillStrokeStyles,
    CanvasShadowStyles,
    CanvasFilters,
    CanvasRect,
    CanvasDrawPath,
    CanvasUserInterface,
    CanvasText,
    CanvasDrawImage,
    CanvasHitRegion,
    CanvasImageData,
    CanvasPathDrawingStyles,
    CanvasTextDrawingStyles,
    CanvasPath,
    RenderingContext

Exposes the JavaScript CanvasRenderingContext2D to Kotlin

Path2D

open external class Path2D : CanvasPath

Exposes the JavaScript Path2D to Kotlin