+ set SVG path visibility=false if display=none

This commit is contained in:
Artem Pavlenko 2012-04-09 12:27:19 +01:00
parent 2df8e99af2
commit 87ec80b819

View file

@ -128,7 +128,8 @@ bool parse_style (const char* str, pairs_type & v)
svg_parser::svg_parser(svg_converter<svg_path_adapter, svg_parser::svg_parser(svg_converter<svg_path_adapter,
agg::pod_bvector<mapnik::svg::path_attributes> > & path) agg::pod_bvector<mapnik::svg::path_attributes> > & path)
: path_(path), : path_(path),
is_defs_(false) {} is_defs_(false)
{}
svg_parser::~svg_parser() {} svg_parser::~svg_parser() {}
@ -367,6 +368,10 @@ void svg_parser::parse_attr(const xmlChar * name, const xmlChar * value )
{ {
path_.visibility(!xmlStrEqual(value, BAD_CAST "hidden")); path_.visibility(!xmlStrEqual(value, BAD_CAST "hidden"));
} }
else if (xmlStrEqual(name, BAD_CAST "display") && xmlStrEqual(value, BAD_CAST "none"))
{
path_.visibility(false);
}
} }