comparison 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
comparison
equal deleted inserted replaced
750:199bac90b90a 751:9f4a1134ec82
2 var sys=require("sys"); 2 var sys=require("sys");
3 3
4 4
5 function canvas(app,root) { 5 function canvas(app,root) {
6 this.mb_rt = app.mb_rt; 6 this.mb_rt = app.mb_rt;
7 this.parent = root;
7 this.root = this.mb_rt.coord_new(root); 8 this.root = this.mb_rt.coord_new(root);
8 this.bg_r = 0; 9 this.bg_r = 0;
9 this.bg_g = 0; 10 this.bg_g = 0;
10 this.bg_b = 0; 11 this.bg_b = 0;
11 this.bg_a = 0; 12 this.bg_a = 0;
51 52
52 canvas.prototype.strokeWeight=function(w) { 53 canvas.prototype.strokeWeight=function(w) {
53 this.stroke_w = w; 54 this.stroke_w = w;
54 } 55 }
55 56
57 canvas.prototype.alpha=function(c) {
58 }
59
60 canvas.prototype.red=function(c) {
61 }
62 canvas.prototype.green=function(c) {
63 }
64 canvas.prototype.blue=function(c) {
65 }
66
67
68 canvas.prototype.clear=function() {
69 this.root.remove();
70 this.root = this.mb_rt.coord_new(this.parent);
71 }
72
73 canvas.prototype.arc=function(x,y,w,h,start,end) {
74 }
75
76 canvas.prototype.ellipse=function(x, y, width, height) {
77 }
78
79 canvas.prototype.point=function(x,y) {
80 }
81
82 canvas.prototype.quad=function(x1,y1,x2,y2,x3,y3,x4,y4) {
83 }
84
85 canvas.prototype.triangle=function(x1,y1,x2,y2,x3,y3) {
86 }
87
88 canvas.prototype.bezier=function(x1, y1, cx1, cy1, cx2, cy2, x2, y2) {
89 }
90
91 canvas.prototype.curveTightness=function(squishy) {
92 }
93
94 canvas.prototype.colorMode=function() {
95 }
96
97 canvas.prototype.fill=function(color) {
98 }
99
100 canvas.prototype.noFill=function() {
101 }
102
103 canvas.prototype.noStroke=function() {
104 }
105
56 106
57 exports.canvas = canvas; 107 exports.canvas = canvas;