1 /* Copyright 2011 The Dominion of Awesome
2 * See COPYING for licensing information */
8 style: "background-color: black",
10 {kind: enyo.Control, nodeTag: "canvas", name: "display", width: "512px", height: "512px"}
16 rendered: function() {
17 var node = this.$.display.hasNode();
20 this.ctx = node.getContext('2d');
21 this.ctx.fillStyle = 'black';
22 this.ctx.fillRect(0, 0, 255, 255);
23 this.ctx.fillStyle = 'rgba(0,0,0,0.075)';
24 this.ctx.strokeStyle = '#00FF00';
29 this.ctx.fillRect(0, 0, 256, 256);
31 for (var x = 0; x < 256; x++) {
33 this.ctx.moveTo(x, y);
34 this.ctx.lineTo(x+1, y+1);
37 this.t = (this.t + 1) % 255;
41 if (this.timer) return;
42 this.timer = setInterval(this.draw.bind(this), 20);
46 clearInterval(this.timer);