Mercurial > MadButterfly
changeset 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 | 58a4e9bb8bb7 |
children | 3136db0ac01b |
files | nodejs/svg.js |
diffstat | 1 files changed, 0 insertions(+), 8 deletions(-) [+] |
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;