# HG changeset patch # User Thinker K.F. Li # Date 1285482355 -28800 # Node ID 96bc29e948cc48a0ce52ab97859d47fbb09ba707 # Parent 58a4e9bb8bb781cfb47e2b09614b1fc69bf0f8cf Do not fill and stroke when the color is none or unseted diff -r 58a4e9bb8bb7 -r 96bc29e948cc nodejs/svg.js --- 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;