# HG changeset patch # User Thinker K.F. Li # Date 1282800948 -28800 # Node ID 86f2c0fbadfc490a16704962ff667fbbd82cab6d # Parent cedfe4966fd6307f674062cf6090ef52b1ee4209# Parent ffbf9910213c2d0af1457f20acee4b30aa7d21cd Merge from head diff -r cedfe4966fd6 -r 86f2c0fbadfc nodejs/canvas.js --- a/nodejs/canvas.js Thu Aug 26 13:35:21 2010 +0800 +++ b/nodejs/canvas.js Thu Aug 26 13:35:48 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; diff -r cedfe4966fd6 -r 86f2c0fbadfc nodejs/desktop.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nodejs/desktop.svg Thu Aug 26 13:35:48 2010 +0800 @@ -0,0 +1,108 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff -r cedfe4966fd6 -r 86f2c0fbadfc nodejs/testcanvas.js --- a/nodejs/testcanvas.js Thu Aug 26 13:35:21 2010 +0800 +++ b/nodejs/testcanvas.js Thu Aug 26 13:35:48 2010 +0800 @@ -11,14 +11,19 @@ app.canvas.strokeWeight(8); width=200; height=200; -for(i=0;i