Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including node-canvas-nw-build with all npm packages installed. Try it out:

var nodeCanvasNwBuild = require("node-canvas-nw-build")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

node-canvas-nw-build v3.0.4

Canvas graphics API backed by Cairo. NW.js build for windows


NW.JS build module node-canvas from windows

Official repository node-canvas


$ npm install node-canvas-nw-build


var Canvas = require('canvas-nw-build')
  , Image = Canvas.Image
  , canvas = new Canvas(200, 200)
  , ctx = canvas.getContext('2d');

ctx.font = '30px Impact';
ctx.fillText("Awesome!", 50, 100);

var te = ctx.measureText('Awesome!');
ctx.strokeStyle = 'rgba(0,0,0,0.5)';
ctx.lineTo(50, 102);
ctx.lineTo(50 + te.width, 102);

console.log('<img src="' + canvas.toDataURL() + '" />');
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free