ait-canvas
Advanced tools
Comparing version 0.6.3 to 0.6.4
27
index.js
@@ -194,17 +194,24 @@ const { | ||
function createLinearGradient([x2, y2], [x1, y1]) { | ||
function createLinearGradient(p2, p1) { | ||
var [x1, y1] = p1.body.map(unwrap).reverse(); | ||
var [x2, y2] = p2.body.map(unwrap).reverse(); | ||
return wrap(unwrap(lookup(this, CTX)).createLinearGradient(x1, y1, x2, y2)); | ||
} | ||
function createRadialGradient(r2, [x2, y2], r1, [x1, y1]) { | ||
return wrap(unwrap(lookup(this, CTX)).createRadialGradient(x1, y1, r1, x2, y2, r2)); | ||
function createRadialGradient(r2, p2, r1, p1) { | ||
var [x1, y1] = p1.body.map(unwrap).reverse(); | ||
var [x2, y2] = p2.body.map(unwrap).reverse(); | ||
return wrap(unwrap(lookup(this, CTX)).createRadialGradient(x1, y1, unwrap(r1), x2, y2, unwrap(r2))); | ||
} | ||
function addColorStop(color, offset, gradient) { | ||
gradient.addColorStop(offset, color); | ||
unwrap(gradient).addColorStop(unwrap(offset), unwrap(color)); | ||
return wrap(gradient); | ||
} | ||
function getImageData(height, width, [sx, sy]) { | ||
return wrap(unwrap(lookup(this, CTX)).getImageData(sx, sy, width, height)); | ||
function getImageData(height, width, p) { | ||
var [sx, sy] = p.body.map(unwrap).reverse(); | ||
return wrap(unwrap(lookup(this, CTX)).getImageData(sx, sy, unwrap(width), unwrap(height))); | ||
} | ||
@@ -275,5 +282,5 @@ | ||
shadowColor: aitFFI__F(1, 'shadowColor', unwrapper(shadowColor)), | ||
createLinearGradient: aitFFI__F(2, 'createLinearGradient', unwrapper(createLinearGradient)), | ||
createRadialGradient: aitFFI__F(4, 'createRadialGradient', unwrapper(createRadialGradient)), | ||
addColorStop: aitFFI__F(3, 'addColorStop', unwrapper(addColorStop)), | ||
createLinearGradient: aitFFI__F(2, 'createLinearGradient', createLinearGradient), | ||
createRadialGradient: aitFFI__F(4, 'createRadialGradient', createRadialGradient), | ||
addColorStop: aitFFI__F(3, 'addColorStop', addColorStop), | ||
// fillText, | ||
@@ -291,4 +298,4 @@ // strokeText, | ||
// createImageData, | ||
getImageData: aitFFI__F(3, 'getImageData', unwrapper(getImageData)), | ||
getImageData: aitFFI__F(3, 'getImageData', getImageData), | ||
putImageData: aitFFI__F(5, 'putImageData', unwrapper(putImageData)) | ||
}; |
{ | ||
"name": "ait-canvas", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "Ait module with html canvas bindings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
12327
296
0