Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

ctx-polyfill

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc