# HG changeset patch # User Thinker K.F. Li # Date 1281695024 -28800 # Node ID c93381320d6e84eae0862fd29efd40318bfe34b3 # Parent 920c9e6e42143e115165d3315375cbef278491f1 Fill shapes with black if with out any stroke and fill in the style diff -r 920c9e6e4214 -r c93381320d6e nodejs/svg.js --- 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);