Mercurial > MadButterfly
diff nodejs/svg.js @ 891:96bc29e948cc abs_n_rel_center
Do not fill and stroke when the color is none or unseted
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 26 Sep 2010 14:25:55 +0800 |
parents | 143ac14c3ce9 |
children | ec94dd788332 |
line wrap: on
line diff
--- a/nodejs/svg.js Sun Sep 26 14:11:41 2010 +0800 +++ b/nodejs/svg.js Sun Sep 26 14:25:55 2010 +0800 @@ -658,7 +658,6 @@ var fill_color; var stroke_color; var stroke_width = 1; - var black_paint; var i; if(style) { @@ -678,24 +677,17 @@ return; } - if(!fill_color || !stroke_color) - black_paint = this.mb_rt.paint_color_new(0, 0, 0, 1); - if(fill_color) { if(fill_color != "none") { paint = this._prepare_paint_color(fill_color, fill_alpha); paint.fill(tgt); } - } else { - black_paint.fill(tgt); } if(stroke_color) { if(stroke_color != "none") { paint = this._prepare_paint_color(stroke_color, stroke_alpha); paint.stroke(tgt); } - } else { - black_paint.stroke(tgt); } tgt.stroke_width = stroke_width;