Skip to content
Browse files

only allow restyling of svg paths that already have visible display o…

…f stroke/fill
  • Loading branch information...
1 parent e213f49 commit 81937f7317777e7a9a262985590a2507be9c1b03 @springmeyer springmeyer committed Jul 28, 2012
Showing with 3 additions and 6 deletions.
  1. +2 −5 include/mapnik/marker_helpers.hpp
  2. +1 −1 src/marker_cache.cpp
View
7 include/mapnik/marker_helpers.hpp
@@ -44,18 +44,15 @@ bool push_explicit_style(Attr const& src, Attr & dst, markers_symbolizer const&
{
mapnik::svg::path_attributes attr = src[i];
- if (strk)
+ if (strk && attr.stroke_flag)
{
- attr.stroke_flag = true;
attr.stroke_width = strk->get_width();
color const& s_color = strk->get_color();
attr.stroke_color = agg::rgba(s_color.red()/255.0,s_color.green()/255.0,
s_color.blue()/255.0,(s_color.alpha()*strk->get_opacity())/255.0);
}
- if (fill)
+ if (fill && attr.fill_flag)
{
-
- attr.fill_flag = true;
color const& f_color = *fill;
attr.fill_color = agg::rgba(f_color.red()/255.0,f_color.green()/255.0,
f_color.blue()/255.0,(f_color.alpha()*sym.get_opacity())/255.0);
View
2 src/marker_cache.cpp
@@ -59,7 +59,7 @@ marker_cache::marker_cache()
insert_svg("arrow",
"<?xml version='1.0' standalone='no'?>"
"<svg width='100%' height='100%' version='1.1' xmlns='http://www.w3.org/2000/svg'>"
- "<path fill='#93a7ac' d='m 31.698405,7.5302648 -8.910967,-6.0263712 0.594993,4.8210971 -18.9822542,0 0,2.4105482 18.9822542,0 -0.594993,4.8210971 z'/>"
+ "<path fill='#0000FF' stroke='black' stroke-width='.5' d='m 31.698405,7.5302648 -8.910967,-6.0263712 0.594993,4.8210971 -18.9822542,0 0,2.4105482 18.9822542,0 -0.594993,4.8210971 z'/>"
"</svg>");
}

0 comments on commit 81937f7

Please sign in to comment.
Something went wrong with that request. Please try again.