amend/partially revert #2609

This commit is contained in:
Dane Springmeyer 2015-01-09 12:11:41 -08:00
parent 014af51d95
commit c7bb16fcd9
21 changed files with 272 additions and 103 deletions

View file

@ -255,11 +255,13 @@ public:
}
void fill_none()
{
cur_attr().fill_none = true;
cur_attr().fill_flag = false;
}
void stroke_none()
{
cur_attr().stroke_none = true;
cur_attr().stroke_flag = false;
}

View file

@ -50,7 +50,9 @@ struct path_attributes
agg::line_join_e line_join;
agg::line_cap_e line_cap;
bool fill_flag;
bool fill_none;
bool stroke_flag;
bool stroke_none;
bool even_odd_flag;
bool visibility_flag;
bool display_flag;
@ -71,7 +73,9 @@ struct path_attributes
line_join(agg::miter_join),
line_cap(agg::butt_cap),
fill_flag(true),
fill_none(false),
stroke_flag(false),
stroke_none(false),
even_odd_flag(false),
visibility_flag(true),
display_flag(true)
@ -94,7 +98,9 @@ struct path_attributes
line_join(attr.line_join),
line_cap(attr.line_cap),
fill_flag(attr.fill_flag),
fill_none(attr.fill_none),
stroke_flag(attr.stroke_flag),
stroke_none(attr.stroke_none),
even_odd_flag(attr.even_odd_flag),
visibility_flag(attr.visibility_flag),
display_flag(attr.display_flag)
@ -115,7 +121,9 @@ struct path_attributes
line_join(attr.line_join),
line_cap(attr.line_cap),
fill_flag(attr.fill_flag),
fill_none(attr.fill_none),
stroke_flag(attr.stroke_flag),
stroke_none(attr.stroke_none),
even_odd_flag(attr.even_odd_flag),
visibility_flag(attr.visibility_flag),
display_flag(attr.display_flag)

View file

@ -76,9 +76,14 @@ bool push_explicit_style(svg_attribute_type const& src,
bool success = false;
for(unsigned i = 0; i < src.size(); ++i)
{
success = true;
dst.push_back(src[i]);
mapnik::svg::path_attributes & attr = dst.last();
if (!attr.visibility_flag)
continue;
success = true;
if (!attr.stroke_none)
{
if (stroke_width)
{
attr.stroke_width = *stroke_width;
@ -98,6 +103,9 @@ bool push_explicit_style(svg_attribute_type const& src,
attr.stroke_opacity = *stroke_opacity;
attr.stroke_flag = true;
}
}
if (!attr.fill_none)
{
if (fill_color)
{
color const& f_color = *fill_color;
@ -113,6 +121,7 @@ bool push_explicit_style(svg_attribute_type const& src,
attr.fill_flag = true;
}
}
}
return success;
}
return false;

View file

@ -0,0 +1,10 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<!-- no fill is default black in SVG spec and stroke is default not showing unless a width is provided -->
<rect width="15" height="15" style="stroke-width:100" />
</svg>

After

Width:  |  Height:  |  Size: 393 B

View file

@ -0,0 +1,10 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<!-- no fill is default black in SVG spec and stroke is default not showing unless a width is provided -->
<rect width="15" height="15" style="fill:green;stroke-opacity:0" />
</svg>

After

Width:  |  Height:  |  Size: 404 B

View file

@ -69,40 +69,40 @@
" ",
" ",
" ",
" !!!!!! ",
" !!!!!!!!!!! !",
" !!! ",
" !!! !!!! !",
" ! !!!! !!!!! ",
" !!! !!!!! !! ",
" !!! !!!!!!!!!! ",
" !!! !!!!!!!!!! ! ",
" !! !!!!!! !!!!! !!!!! ",
" ! !!!!! !!!!!!!!!!!! !!!!! ",
" !!!!! !!!!!!!!!!!! !!!!! ! ",
" !!!!! !!!!! !!!!!! !!!!! !! ",
" !!!! !!!!! !!!!!! !!!!! !!! ",
" !!! !!!!! !!!!! !!!!!! !!!! ",
" ! !!!!!! !!!!!!!!!!!! !!!!! ",
" !!!!!! !!!!!!!!!!! !!!!!! ",
" !!!!!!!!!!!! !!!!! !!!!!! ! ",
" !!!! !!!!!! !!!!! !!!!! !!! ",
" !!! !!!!!! !!!!! !!!!! !!!! ",
" !! !!!!! !!!!!! !!!!! !!!!! ",
" ! !!!!! !!!!!!!!!!!! !!!!! ",
" !!!!! !!!!! !!!!!! !!!!! ! ",
" !!!!! !!!!! !!!!!! !!!!! !! ",
" !!!! !!!!! !!!!! !!!!!! !!! ",
" !!!!!!!!! !!!!! !!!!!! !!!! ",
" ! !!!!!! !!!!!!!!!!! !!!!!! ",
" !!!!!! !!!!!!!!!!! !!!!!! ",
" !!!!! !!!!!! !!!!! !!!!! !! ",
" !!!! !!!!!! !!!!! !!!!! !!! ",
" !!! !!!!! !!!!!! !!!!! !!!! ",
" !! !!!!! !!!!!! !!!!! !!!!! ",
" ! !!!!! !!!!!!!!!!!! !!!!! ",
" !!!!! !!!!! !!!!!! !!!!! ! ",
" !!!!! !!!!! !!!!! !!!!!! !! ",
"!!!!!! !!!!! !!!!!! !!! ",
" !!!!! !!!!! !!!!! ",
" !!! !!! !!!! !!! ",
" !! !!!! !!!! !!! ",
" !!! !!!! !! ",
" !!! !!!!!! !!! ",
" !!!!! ! ",
" !! ",
" !!! !!!!!!!!! ! ",
" !!! !!!! !!!! !! ",
" !! !!!! !!!!! !! ",
" ! !!!! !!!!! !! ",
" !!! !!!!! !! ",
" !!! !!!!!!!!!! ",
" !!! !!!! !!!! !! ",
" !!! !!!! !!!! !! ",
" !! !!!! !!!!! !! ",
" !!! !!!!! !! ",
" !!! !!!!!! !!! ",
" !!! !!!!!!!!! ! ",
" !!! !!!! !!!! !! ",
" !! !!!!! !!!!! !! ",
" ! !!!! !!!!! !!! ",
" !!! !!!!! !!! ",
" !!! !!!!!!!!!! ",
" !!! !!!! !!!! !! ",
" !!! !!!! !!!!! !! ",
" !!!! !!!!! !! ",
" !!!!! !! ",
"!!!!! ",
" ! ",
" ",
" ",
" "
]

View file

@ -66,44 +66,44 @@
" ",
" ",
" ",
" ! ",
" !!!!!!! ",
" !!!!!!!!!!! ",
" ",
" !!! ",
" !!!!!! ",
" !!!!! ",
" !!!!!! !!!!!!! !",
" !!!!!!!!! !!!!!!!!!! !",
" !!!!!! !!!!!!!!! ",
" !!! !!!!!!!! !!!!!!!! ",
" !!!!!! !!!!!!!!!!! !!!!!!! ",
" ! !!!!!!! !!!!!!!!! !!!! ",
" !!!!! !!!!!!!! !!!!!!!! !! ",
" !!!!!!! !!!!!!!!!!! !!!!!!!!!!! ",
" !!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!! ",
" !!!!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! ",
" !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! ",
" !! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!!!!! ",
" !!!!!!!! !!!!!!!!!! !!!!!!!!!! !!!!!!!!!!! !!!! ",
" !!!!!!!!!!! !!!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! ",
" !!!!! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!! ",
" !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! ! ",
" !!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! !!!!!!!!! ",
" !!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!!!!!! !!! ",
" ! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! ",
" !!!!!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! !!!!!! ",
" !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!!! !!!!!!!!!! ",
" !!! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!!!! ",
" !!!!!!!!! !!!!!!!!!! !!!!!!!!!! !!!!!!!!!!! !!! ",
" ! !!!!!!!!!!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! ",
" !!!!!! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!! ",
" !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!!!! !!!!!!!!!!! ",
" !!!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! !!!!!!!! ",
" !!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!!!!!! !! ",
" !! !!!!!!!!!! !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!! ",
" !!!!!!! !!!!!!!!!!! !!!!!!!!!! !!!!!!!!!! !!!!! ",
" !!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!! ",
" !!!!!!!!!! !!!!!!!!!!! !!!!!!!!!!! !!!!!!! ",
" !!!!!!!!!! !!!!!!!!!! !!!!!!!!!!! !! ",
" !!!!!!!!!!! !!!!!!!!!! !!!!!!!!! ",
" !!!!!!!!!!! !!!!!!!!!!! !!!! ",
" !!!!!! !!!!!!!!! !!!! ",
" !!!! !!!!!!! !!!!!!! !!!! ",
" !!!!!!!!!! !!!!!!! ",
" !!!!!!!!!! ! ",
" !!!!!!!!! ",
" !!!! "
" !!!!!! !!!!!!!!!! !! !!!! ",
" ! !!!!!!!! !!!!!!!!! !!!!! ",
" !!!!!! !!!!!!!! !!!!!!!! ! ",
" !!!!! !!!!!!!!! !!!!! ",
" !!!! !!!!!!! !!!!!!! !!!! ",
" !!!!! !!!!!!!!!! ! !!!! ",
" !! !!!!!!! !!!!!!!!! !!!! ",
" !!!!!! !!!!!!!! !!!!!!!!! ",
" !!!!!! !!!!!!!!!! !!!! ",
" !!!!! !!!!!!! !!!!!! !!! ",
" !!!!!! !!!!!!!!!! !!!! ",
" !! !!!!!!!! !!!!!!!!! !!!!! ",
" !!!!!! !!!!!!!! !!!!!!!!! ",
" !!!!! !!!!!!!!! !!!!! ",
" !!!!! !!!!!!! !!!!!! !!! ",
" !!!!!! !!!!!!!!! !!!! ",
" !!! !!!!!!!! !!!!!!!! !!!! ",
" !!!!!! !!!!!!!!!!! !!!!!!! ",
" !!!!!! !!!!!!!!!! !!!! ",
" !!!!!!! !!!!!!! !! ",
" !!!!!!!!!! !!!!! ",
" !!!!!!!! !!!!! ",
"! !! !!! ",
" !!!!! ",
" ! ",
" ",
" "
]
}

View file

@ -0,0 +1,37 @@
{
"keys": [
"",
"4",
"3",
"2",
"1"
],
"data": {},
"grid": [
" ",
" ",
" ",
" !!!!! ",
" !!!!! ",
" !!!!! ",
" !!!!! ",
" !!!!! ",
" #### ",
" #### ",
" #### ",
" #### ",
" ",
" ",
" $$$ ",
" $$$ ",
" $$$ ",
" ",
" %%%% ",
" %%%% ",
" %%%% ",
" %%%% ",
" ",
" ",
" "
]
}

View file

@ -0,0 +1,35 @@
{
"keys": [
"",
"3",
"1"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" !!!!!!! ",
" !!!!!!! ",
" !!!!!!! ",
" !!!!!!! ",
" !!!!!!! ",
" !!!!!!! ",
" !!!!!!! ",
" ",
" ",
" ",
" ####### ",
" ####### ",
" ####### ",
" ####### ",
" ####### ",
" ####### ",
" ####### ",
" "
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 317 B

View file

@ -0,0 +1,58 @@
<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<Style name="ellipse">
<Rule>
<Filter>[id]=1</Filter>
<MarkersSymbolizer file="../../data/svg/rect-no-fill.svg" />
</Rule>
<Rule>
<Filter>[id]=2</Filter>
<MarkersSymbolizer fill-opacity=".5" file="../../data/svg/rect2.svg" />
</Rule>
<Rule>
<Filter>[id]=3</Filter>
<MarkersSymbolizer file="../../data/svg/rect-no-stroke.svg" />
</Rule>
<Rule>
<Filter>[id]=4</Filter>
<MarkersSymbolizer stroke-width="2" stroke-opacity=".5" file="../../data/svg/rect-no-stroke.svg" />
</Rule>
</Style>
<Layer name="layer" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>ellipse</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
x,y,id
1,1,1
2,2,2
3,3,3
4,4,4
</Parameter>
</Datasource>
</Layer>
<!-- points to frame data view -->
<Style name="frame">
<Rule>
<PointSymbolizer />
</Rule>
</Style>
<Layer name="frame" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>frame</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
x,y
0,0
5,0
0,5
5,5
</Parameter>
</Datasource>
</Layer>
</Map>