ctx-polyfill
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "ctx-polyfill", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Polyfill CanvasRenderingContext2D and Path2D (currentTransform, resetTransform, imageSmoothingEnabled, etc...)", | ||
@@ -5,0 +5,0 @@ "main": "ctx-polyfill.js", |
@@ -20,8 +20,10 @@ ### Polyfill CanvasRenderingContext2D and Path2Dto match last ES7 specifications | ||
##### Path2D ==> [documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D) | ||
Stable: arc, arcTo, bezierCurveTo, closePath, ellipse, lineTo, moveTo, quadraticCurveTo, rect . | ||
Stable: arc, arcTo, bezierCurveTo, closePath, ellipse, lineTo, moveTo, quadraticCurveTo, rect. | ||
Experimental: [addPath](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/addPath). | ||
With **native** Path2D, `addPath` does not support yet a `tranform`argument. If you absolutelly need it, do : `delete window.Path2D`, the polyfill will build it's own Path2DClass. | ||
For size reasons, Path2D polyfill does'nt support SVG path (used as argument in constructor) ! | ||
With **native** Path2D, `addPath` does not support yet a `transform` argument. If you absolutely need it, do : `delete window.Path2D`, the polyfill will build it's own Path2D class. | ||
For size reasons, Path2D polyfill does'nt support SVG path (used as argument in constructor). | ||
#### Helper | ||
@@ -42,4 +44,4 @@ Because the specs are not finished, the `currentTransform` or even `Path2D.addPath`originally used [SVGMatrix](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) which have beed deprecated. Instead, use an Array[6]. | ||
```ts | ||
CanvasRenderingContext2D.svgMatrixToArray(array: number[]): number[]; | ||
CanvasRenderingContext2D.svgMatrixToArray(matrix: SVGMatrix): number[]; | ||
``` | ||
Convert a SVGMatrix into a transform matrix array. |
29846
45