Package Exports
- node-canvas-nw-build
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-canvas-nw-build) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-canvas
NW.JS build module node-canvas from windows
Official repository node-canvas
Installation
$ npm install node-canvas-nw-build
Example
var Canvas = require('canvas-nw-build')
, Image = Canvas.Image
, canvas = new Canvas(200, 200)
, ctx = canvas.getContext('2d');
ctx.font = '30px Impact';
ctx.rotate(.1);
ctx.fillText("Awesome!", 50, 100);
var te = ctx.measureText('Awesome!');
ctx.strokeStyle = 'rgba(0,0,0,0.5)';
ctx.beginPath();
ctx.lineTo(50, 102);
ctx.lineTo(50 + te.width, 102);
ctx.stroke();
console.log('<img src="' + canvas.toDataURL() + '" />');