Mercurial > MadButterfly
diff nodejs/canvas.js @ 751:9f4a1134ec82
Use the coord.remove() to implement the processing canvas
author | wycc |
---|---|
date | Thu, 26 Aug 2010 00:28:12 +0800 |
parents | cdd578c1f866 |
children | 1b522a22e16a |
line wrap: on
line diff
--- a/nodejs/canvas.js Thu Aug 26 00:16:12 2010 +0800 +++ b/nodejs/canvas.js Thu Aug 26 00:28:12 2010 +0800 @@ -4,6 +4,7 @@ function canvas(app,root) { this.mb_rt = app.mb_rt; + this.parent = root; this.root = this.mb_rt.coord_new(root); this.bg_r = 0; this.bg_g = 0; @@ -53,5 +54,54 @@ this.stroke_w = w; } +canvas.prototype.alpha=function(c) { +} + +canvas.prototype.red=function(c) { +} +canvas.prototype.green=function(c) { +} +canvas.prototype.blue=function(c) { +} + + +canvas.prototype.clear=function() { + this.root.remove(); + this.root = this.mb_rt.coord_new(this.parent); +} + +canvas.prototype.arc=function(x,y,w,h,start,end) { +} + +canvas.prototype.ellipse=function(x, y, width, height) { +} + +canvas.prototype.point=function(x,y) { +} + +canvas.prototype.quad=function(x1,y1,x2,y2,x3,y3,x4,y4) { +} + +canvas.prototype.triangle=function(x1,y1,x2,y2,x3,y3) { +} + +canvas.prototype.bezier=function(x1, y1, cx1, cy1, cx2, cy2, x2, y2) { +} + +canvas.prototype.curveTightness=function(squishy) { +} + +canvas.prototype.colorMode=function() { +} + +canvas.prototype.fill=function(color) { +} + +canvas.prototype.noFill=function() { +} + +canvas.prototype.noStroke=function() { +} + exports.canvas = canvas;