CanvasTransform

external interface CanvasTransform (source)

Platform and version requirements: JS

Functions

getTransform

abstract fun getTransform(): DOMMatrix

resetTransform

abstract fun resetTransform()

rotate

abstract fun rotate(angle: Double)

scale

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

setTransform

abstract fun setTransform(
    a: Double,
    b: Double,
    c: Double,
    d: Double,
    e: Double,
    f: Double)
abstract fun setTransform(
    transform: dynamic = definedExternally)

transform

abstract fun transform(
    a: Double,
    b: Double,
    c: Double,
    d: Double,
    e: Double,
    f: Double)

translate

abstract fun translate(x: Double, y: 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