node-skia-canvas
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -6,2 +6,10 @@ const { Canvas: NativeCanvas } = require('bindings')('node-skia') | ||
constructor (width, height) { | ||
if (typeof width !== 'number' || width <= 0) { | ||
throw new Error('construct canvas error: width should be a number and greater than 0') | ||
} | ||
if (typeof height !== 'number' || height <= 0) { | ||
throw new Error('construct canvas error: height should be a number and greater than 0') | ||
} | ||
this.nativeCanvas = new NativeCanvas(width, height) | ||
@@ -8,0 +16,0 @@ this._ctx2d = null; |
{ | ||
"name": "node-skia-canvas", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Skia based graphics canvas run on node.js, written in Node-API", | ||
@@ -5,0 +5,0 @@ "main": "lib/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
54693
1163