Mercurial > MadButterfly
comparison nodejs/svg.js @ 807:5723e5446b7c
Fix incorrect variable name
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 01 Sep 2010 18:04:20 +0800 |
parents | 843f1b5548d7 |
children | 9b6c26cf9102 |
comparison
equal
deleted
inserted
replaced
806:bf54c0408d35 | 807:5723e5446b7c |
---|---|
1 // -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*- | 1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- |
2 // vim: sw=4:ts=8:sts=4 | 2 // vim: sw=4:ts=8:sts=4 |
3 var libxml = require('libxmljs'); | 3 var libxml = require('libxmljs'); |
4 var sys=require('sys'); | 4 var sys=require('sys'); |
5 var mbfly = require("mbfly"); | 5 var mbfly = require("mbfly"); |
6 var ldr = mbfly.img_ldr_new("."); | 6 var ldr = mbfly.img_ldr_new("."); |
175 b = parseInt(color.substring(5,7),16)/255; | 175 b = parseInt(color.substring(5,7),16)/255; |
176 paint = this.mb_rt.paint_color_new(r, g, b, alpha); | 176 paint = this.mb_rt.paint_color_new(r, g, b, alpha); |
177 } else if(_std_colors[color]) { | 177 } else if(_std_colors[color]) { |
178 c = _std_colors[color]; | 178 c = _std_colors[color]; |
179 paint = this.mb_rt.paint_color_new(c[0], c[1], c[2], alpha); | 179 paint = this.mb_rt.paint_color_new(c[0], c[1], c[2], alpha); |
180 } else if (fill.substring(0,3) == 'url') { | 180 } else if (color.substring(0,3) == 'url') { |
181 var id = fill.substring(5,fill.length-1); | 181 var id = color.substring(5, color.length-1); |
182 var gr = this.gradients[id]; | 182 var gr = this.gradients[id]; |
183 paint = this.mb_rt.paint_linear_new(gr[0],gr[1],gr[2],gr[3]); | 183 paint = this.mb_rt.paint_linear_new(gr[0],gr[1],gr[2],gr[3]); |
184 paint.set_stops(this.stop_ref[id]); | 184 paint.set_stops(this.stop_ref[id]); |
185 } else { | 185 } else { |
186 paint = this.mb_rt.paint_color_new(0,0,0,1); | 186 paint = this.mb_rt.paint_color_new(0,0,0,1); |