Class: Matrix

Matrix

2D transformation matrix object initialized with identity matrix.

The matrix can synchronize a canvas context by supplying the context
as an argument, or later apply current absolute transform to an
existing context.

All values are handled as floating point values.

Name Type Description
context CanvasRenderingContext2D optional

Optional context to sync with Matrix

Properties:
Name Type Argument Default Description
a number

scale x

b number

shear y

c number

shear x

d number

scale y

e number

translate x

f number

translate y

context CanvasRenderingContext2D | null <optional>
null

set or get current canvas context