HTML canvas element's CanvasRenderingContext2D has a property currentTransform defined. This represents a transformation matrix as a SVGMatrix object.
There seems to be no browser implementation activity at current.
Having this property natively supported would be of great help, as we can modify the transformation matrix by setTransform
, transform
, translate
, ... methods, but we are not able to access the current transform matrix element values.
This polyfill uses the experimental mozCurrentTransform
or webkitCurrentTransform
properties if available or implements a lightweight transformation matrix stack otherwise.