Skip to content

Commit

Permalink
load_map: a stroke-width=0 is valid for markers now (for restyling svg)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Jul 26, 2012
1 parent 5bd0bec commit 9f06496
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/load_map.cpp
Expand Up @@ -1055,8 +1055,7 @@ void map_parser::parse_markers_symbolizer(rule & rule, xml_node const& node)
if (height) sym.set_height(*height); if (height) sym.set_height(*height);


stroke strk; stroke strk;
if (parse_stroke(strk,node)) sym.set_stroke(strk);
sym.set_stroke(strk);


marker_placement_e placement = node.get_attr<marker_placement_e>("placement", MARKER_POINT_PLACEMENT); marker_placement_e placement = node.get_attr<marker_placement_e>("placement", MARKER_POINT_PLACEMENT);
sym.set_marker_placement(placement); sym.set_marker_placement(placement);
Expand Down Expand Up @@ -1302,7 +1301,6 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym)


bool map_parser::parse_stroke(stroke & strk, xml_node const & sym) bool map_parser::parse_stroke(stroke & strk, xml_node const & sym)
{ {
bool result = false;
// stroke color // stroke color
optional<color> c = sym.get_opt_attr<color>("stroke"); optional<color> c = sym.get_opt_attr<color>("stroke");
if (c) if (c)
Expand All @@ -1313,7 +1311,7 @@ bool map_parser::parse_stroke(stroke & strk, xml_node const & sym)


// stroke-width // stroke-width
optional<double> width = sym.get_opt_attr<double>("stroke-width"); optional<double> width = sym.get_opt_attr<double>("stroke-width");
if (width && *width > 0) if (width)
{ {
strk.set_width(*width); strk.set_width(*width);
result = true; result = true;
Expand Down

0 comments on commit 9f06496

Please sign in to comment.