// sample.js var Canvas = require('canvas') , http = require('http'); http.createServer(function (req, res) { var canvas = new Canvas(200,200); var ctx = canvas.getContext('2d'); // 四角形描画 ctx.fillStyle = 'rgba(0, 0, 255, 0.5)'; ctx.fillRect(10, 10, 190, 190); // テキスト描画 var text = "Canvas Test"; ctx.font = '30px Impact'; ctx.rotate(.1); ctx.fillStyle = 'rgba(0, 0, 0, 1.0)'; ctx.fillText(text, 10, 1
![サーバサイドでCanvasを利用する(node.js)](https://cdn-ak-scissors.b.st-hatena.com/image/square/39e482c008d605a5b5f9180e98756d084baf2b67/height=288;version=1;width=512/https%3A%2F%2Fblog.asial.co.jp%2Fogp-logo.jpg)