Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ait-canvas

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ait-canvas - npm Package Compare versions

Comparing version 0.5.2 to 0.6.0

47

index.js

@@ -156,2 +156,6 @@ const {

function isPointInPath([x, y]) {
unwrap(lookup(this, CTX)).isPointInStroke(x, y);
}
function closePath() {

@@ -192,7 +196,7 @@ unwrap(lookup(this, CTX)).closePath();

function createLinearGradient([x2, y2], [x1, y1]) {
return this.ctx.createLinearGradient(x1, y1, x2, y2);
return unwrap(lookup(this, CTX)).createLinearGradient(x1, y1, x2, y2);
}
function createRadialGradient(r2, [x2, y2], r1, [x1, y1]) {
return this.ctx.createRadialGradient(x1, y1, r1, x2, y2, r2);
return unwrap(lookup(this, CTX)).createRadialGradient(x1, y1, r1, x2, y2, r2);
}

@@ -205,2 +209,24 @@

function getImageData(height, width, [sx, sy]) {
return unwrap(lookup(this, CTX)).getImageData(sx, sy, width, height);
}
function putImageData(
dirtyHeight,
dirtyWidth,
[dirtyX, dirtyY],
[dx, dy],
image
) {
return unwrap(lookup(this, CTX)).putImageData(
image,
dx,
dy,
dirtyX,
dirtyY,
dirtyWidth,
dirtyHeight
);
}
module.exports = {

@@ -235,2 +261,3 @@ canvasContext: aitFFI__F(1, 'canvasContext', canvasContext),

isPointInPath: aitFFI__F(1, 'isPointInPath', unwrapper(isPointInPath)),
isPointInStroke: aitFFI__F(1, 'isPointInStroke', unwrapper(isPointInStroke)),
fill: aitFFI__F(0, 'fill', fill),

@@ -253,3 +280,17 @@ save: aitFFI__F(0, 'save', save),

createRadialGradient: aitFFI__F(4, 'createRadialGradient', createRadialGradient),
addColorStop: aitFFI__F(3, 'addColorStop', addColorStop)
addColorStop: aitFFI__F(3, 'addColorStop', addColorStop),
// fillText,
// strokeText,
// measureText, // only return .width
// font,
// textAlign,
// textBaseline,
// direction,
// getLineDash,
// setLineDash,
// lineDashOffset,
// drawImage,
// createImageData,
getImageData: aitFFI__F(3, 'getImageData', getImageData),
putImageData: aitFFI__F(5, 'putImageData', putImageData)
};

2

package.json
{
"name": "ait-canvas",
"version": "0.5.2",
"version": "0.6.0",
"description": "Ait module with html canvas bindings",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc