mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
if only width or height are supplied for a marker, make a circle - ellipses can be drawn by different width/height values
This commit is contained in:
parent
ba911c82c1
commit
5d13869da1
@ -914,9 +914,23 @@ void map_parser::parse_markers_symbolizer( rule_type & rule, ptree const & sym )
|
||||
if (allow_overlap) symbol.set_allow_overlap(*allow_overlap);
|
||||
|
||||
optional<double> w = get_opt_attr<double>(sym, "width");
|
||||
if (w) symbol.set_width(*w);
|
||||
optional<double> h = get_opt_attr<double>(sym, "height");
|
||||
if (h) symbol.set_height(*h);
|
||||
if (w && h)
|
||||
{
|
||||
symbol.set_width(*w);
|
||||
symbol.set_height(*h);
|
||||
}
|
||||
else if (w)
|
||||
{
|
||||
symbol.set_width(*w);
|
||||
symbol.set_height(*w);
|
||||
|
||||
}
|
||||
else if (h)
|
||||
{
|
||||
symbol.set_width(*h);
|
||||
symbol.set_height(*h);
|
||||
}
|
||||
|
||||
stroke strk;
|
||||
parse_stroke(strk,sym);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user