Constructors

Link copied to clipboard
constructor()
constructor()

Properties

Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
open var fillStyle: dynamic
Since Kotlin 1.1
abstract var fillStyle: JsAny?
Since Kotlin 1.8
Link copied to clipboard
abstract var filter: String
Since Kotlin 1.1
abstract var filter: String
Since Kotlin 1.8
Link copied to clipboard
abstract var font: String
Since Kotlin 1.1
abstract var font: String
Since Kotlin 1.8
Link copied to clipboard
abstract var globalAlpha: Double
Since Kotlin 1.1
abstract var globalAlpha: Double
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
abstract var lineCap: CanvasLineCap
Since Kotlin 1.1
abstract var lineCap: CanvasLineCap
Since Kotlin 1.8
Link copied to clipboard
abstract var lineDashOffset: Double
Since Kotlin 1.1
abstract var lineDashOffset: Double
Since Kotlin 1.8
Link copied to clipboard
abstract var lineJoin: CanvasLineJoin
Since Kotlin 1.1
abstract var lineJoin: CanvasLineJoin
Since Kotlin 1.8
Link copied to clipboard
abstract var lineWidth: Double
Since Kotlin 1.1
abstract var lineWidth: Double
Since Kotlin 1.8
Link copied to clipboard
abstract var miterLimit: Double
Since Kotlin 1.1
abstract var miterLimit: Double
Since Kotlin 1.8
Link copied to clipboard
abstract var shadowBlur: Double
Since Kotlin 1.1
abstract var shadowBlur: Double
Since Kotlin 1.8
Link copied to clipboard
abstract var shadowColor: String
Since Kotlin 1.1
abstract var shadowColor: String
Since Kotlin 1.8
Link copied to clipboard
abstract var shadowOffsetX: Double
Since Kotlin 1.1
abstract var shadowOffsetX: Double
Since Kotlin 1.8
Link copied to clipboard
abstract var shadowOffsetY: Double
Since Kotlin 1.1
abstract var shadowOffsetY: Double
Since Kotlin 1.8
Link copied to clipboard
open var strokeStyle: dynamic
Since Kotlin 1.1
abstract var strokeStyle: JsAny?
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8

Functions

Link copied to clipboard
abstract fun addHitRegion(options: HitRegionOptions = definedExternally)
Since Kotlin 1.1
abstract fun addHitRegion(options: HitRegionOptions = definedExternally)
Since Kotlin 1.8
Link copied to clipboard
abstract fun arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, anticlockwise: Boolean = definedExternally)
Since Kotlin 1.1
abstract fun arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, anticlockwise: Boolean = definedExternally)
Since Kotlin 1.8
Link copied to clipboard
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)
Since Kotlin 1.1
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)
Since Kotlin 1.8
Link copied to clipboard
abstract fun beginPath()
Since Kotlin 1.1
abstract fun beginPath()
Since Kotlin 1.8
Link copied to clipboard
abstract fun bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double)
Since Kotlin 1.1
abstract fun bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun clearHitRegions()
Since Kotlin 1.1
abstract fun clearHitRegions()
Since Kotlin 1.8
Link copied to clipboard
abstract fun clearRect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.1
abstract fun clearRect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun clip(fillRule: CanvasFillRule = definedExternally)
abstract fun clip(path: Path2D, fillRule: CanvasFillRule = definedExternally)
Since Kotlin 1.1
abstract fun clip(fillRule: CanvasFillRule = definedExternally)
abstract fun clip(path: Path2D, fillRule: CanvasFillRule = definedExternally)
Since Kotlin 1.8
Link copied to clipboard
abstract fun closePath()
Since Kotlin 1.1
abstract fun closePath()
Since Kotlin 1.8
Link copied to clipboard
abstract fun createImageData(imagedata: ImageData): ImageData
abstract fun createImageData(sw: Double, sh: Double): ImageData
Since Kotlin 1.1
abstract fun createImageData(imagedata: ImageData): ImageData
abstract fun createImageData(sw: Double, sh: Double): ImageData
Since Kotlin 1.8
Link copied to clipboard
abstract fun createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double): CanvasGradient
Since Kotlin 1.1
abstract fun createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double): CanvasGradient
Since Kotlin 1.8
Link copied to clipboard
abstract fun createPattern(image: CanvasImageSource, repetition: String): CanvasPattern?
Since Kotlin 1.1
abstract fun createPattern(image: CanvasImageSource, repetition: String): CanvasPattern?
Since Kotlin 1.8
Link copied to clipboard
abstract fun createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double): CanvasGradient
Since Kotlin 1.1
abstract fun createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double): CanvasGradient
Since Kotlin 1.8
Link copied to clipboard
abstract fun drawFocusIfNeeded(element: Element)
abstract fun drawFocusIfNeeded(path: Path2D, element: Element)
Since Kotlin 1.1
abstract fun drawFocusIfNeeded(element: Element)
abstract fun drawFocusIfNeeded(path: Path2D, element: Element)
Since Kotlin 1.8
Link copied to clipboard
abstract fun drawImage(image: CanvasImageSource, dx: Double, dy: Double)
abstract fun drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double)
abstract fun drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double)
Since Kotlin 1.1
abstract fun drawImage(image: CanvasImageSource, dx: Double, dy: Double)
abstract fun drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double)
abstract fun drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, anticlockwise: Boolean = definedExternally)
Since Kotlin 1.1
abstract fun ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, anticlockwise: Boolean = definedExternally)
Since Kotlin 1.8
Link copied to clipboard
abstract fun fill(fillRule: CanvasFillRule = definedExternally)
abstract fun fill(path: Path2D, fillRule: CanvasFillRule = definedExternally)
Since Kotlin 1.1
abstract fun fill(fillRule: CanvasFillRule = definedExternally)
abstract fun fill(path: Path2D, fillRule: CanvasFillRule = definedExternally)
Since Kotlin 1.8
Link copied to clipboard
abstract fun fillRect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.1
abstract fun fillRect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun fillText(text: String, x: Double, y: Double, maxWidth: Double = definedExternally)
Since Kotlin 1.1
abstract fun fillText(text: String, x: Double, y: Double, maxWidth: Double = definedExternally)
Since Kotlin 1.8
Link copied to clipboard
abstract fun getImageData(sx: Double, sy: Double, sw: Double, sh: Double): ImageData
Since Kotlin 1.1
abstract fun getImageData(sx: Double, sy: Double, sw: Double, sh: Double): ImageData
Since Kotlin 1.8
Link copied to clipboard
abstract fun getLineDash(): Array<Double>
Since Kotlin 1.1
abstract fun getLineDash(): JsArray<JsNumber>
Since Kotlin 1.8
Link copied to clipboard
abstract fun getTransform(): DOMMatrix
Since Kotlin 1.1
abstract fun getTransform(): DOMMatrix
Since Kotlin 1.8
Link copied to clipboard
abstract fun isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule = definedExternally): Boolean
abstract fun isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule = definedExternally): Boolean
Since Kotlin 1.1
abstract fun isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule = definedExternally): Boolean
abstract fun isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule = definedExternally): Boolean
Since Kotlin 1.8
Link copied to clipboard
abstract fun isPointInStroke(x: Double, y: Double): Boolean
abstract fun isPointInStroke(path: Path2D, x: Double, y: Double): Boolean
Since Kotlin 1.1
abstract fun isPointInStroke(x: Double, y: Double): Boolean
abstract fun isPointInStroke(path: Path2D, x: Double, y: Double): Boolean
Since Kotlin 1.8
Link copied to clipboard
abstract fun lineTo(x: Double, y: Double)
Since Kotlin 1.1
abstract fun lineTo(x: Double, y: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun measureText(text: String): TextMetrics
Since Kotlin 1.1
abstract fun measureText(text: String): TextMetrics
Since Kotlin 1.8
Link copied to clipboard
abstract fun moveTo(x: Double, y: Double)
Since Kotlin 1.1
abstract fun moveTo(x: Double, y: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun putImageData(imagedata: ImageData, dx: Double, dy: Double)
abstract fun putImageData(imagedata: ImageData, dx: Double, dy: Double, dirtyX: Double, dirtyY: Double, dirtyWidth: Double, dirtyHeight: Double)
Since Kotlin 1.1
abstract fun putImageData(imagedata: ImageData, dx: Double, dy: Double)
abstract fun putImageData(imagedata: ImageData, dx: Double, dy: Double, dirtyX: Double, dirtyY: Double, dirtyWidth: Double, dirtyHeight: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double)
Since Kotlin 1.1
abstract fun quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun rect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.1
abstract fun rect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun removeHitRegion(id: String)
Since Kotlin 1.1
abstract fun removeHitRegion(id: String)
Since Kotlin 1.8
Link copied to clipboard
abstract fun resetClip()
Since Kotlin 1.1
abstract fun resetClip()
Since Kotlin 1.8
Link copied to clipboard
abstract fun resetTransform()
Since Kotlin 1.1
abstract fun resetTransform()
Since Kotlin 1.8
Link copied to clipboard
abstract fun restore()
Since Kotlin 1.1
abstract fun restore()
Since Kotlin 1.8
Link copied to clipboard
abstract fun rotate(angle: Double)
Since Kotlin 1.1
abstract fun rotate(angle: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun save()
Since Kotlin 1.1
abstract fun save()
Since Kotlin 1.8
Link copied to clipboard
abstract fun scale(x: Double, y: Double)
Since Kotlin 1.1
abstract fun scale(x: Double, y: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun scrollPathIntoView()
abstract fun scrollPathIntoView(path: Path2D)
Since Kotlin 1.1
abstract fun scrollPathIntoView()
abstract fun scrollPathIntoView(path: Path2D)
Since Kotlin 1.8
Link copied to clipboard
abstract fun setLineDash(segments: Array<Double>)
Since Kotlin 1.1
abstract fun setLineDash(segments: JsArray<JsNumber>)
Since Kotlin 1.8
Link copied to clipboard
abstract fun setTransform(transform: dynamic = definedExternally)
abstract fun setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double)
Since Kotlin 1.1
abstract fun setTransform(transform: JsAny? = definedExternally)
abstract fun setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun stroke()
abstract fun stroke(path: Path2D)
Since Kotlin 1.1
abstract fun stroke()
abstract fun stroke(path: Path2D)
Since Kotlin 1.8
Link copied to clipboard
abstract fun strokeRect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.1
abstract fun strokeRect(x: Double, y: Double, w: Double, h: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun strokeText(text: String, x: Double, y: Double, maxWidth: Double = definedExternally)
Since Kotlin 1.1
abstract fun strokeText(text: String, x: Double, y: Double, maxWidth: Double = definedExternally)
Since Kotlin 1.8
Link copied to clipboard

For a Dynamic value caught in JS, returns the corresponding Throwable if it was thrown from Kotlin, or null otherwise.

Since Kotlin 1.8
Link copied to clipboard
abstract fun transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double)
Since Kotlin 1.1
abstract fun transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double)
Since Kotlin 1.8
Link copied to clipboard
abstract fun translate(x: Double, y: Double)
Since Kotlin 1.1
abstract fun translate(x: Double, y: Double)
Since Kotlin 1.8
Link copied to clipboard
fun <T : JsAny> JsAny.unsafeCast(): T

Cast JsAny to other Js type without runtime check

Since Kotlin 1.8