Mercurial > MadButterfly
changeset 710:c93381320d6e
Fill shapes with black if with out any stroke and fill in the style
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 13 Aug 2010 18:23:44 +0800 |
parents | 920c9e6e4214 |
children | da794f4fe96c |
files | nodejs/svg.js |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/nodejs/svg.js Fri Aug 13 17:51:21 2010 +0800 +++ b/nodejs/svg.js Fri Aug 13 18:23:44 2010 +0800 @@ -141,7 +141,7 @@ var paint; if (style==null) { - paint = mb_rt.paint_color_new(0,0,0,0.1); + paint = mb_rt.paint_color_new(0,0,0,1); paint.stroke(path); } else { var items = style.value().split(';'); @@ -179,6 +179,10 @@ paint = _prepare_paint_color(stroke_color, stroke_alpha); paint.stroke(path); } + if(!stroke_color && !fill_color) { + paint = mb_rt.paint_color_new(0, 0, 0, 1); + paint.fill(path); + } } coord.add_shape(path);