Add rotation tests.
This commit is contained in:
parent
6b616ebecd
commit
a41eafd8ee
3 changed files with 52 additions and 0 deletions
BIN
tests/visual_tests/images/orientation-800-reference.png
Normal file
BIN
tests/visual_tests/images/orientation-800-reference.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6 KiB |
51
tests/visual_tests/styles/orientation.xml
Normal file
51
tests/visual_tests/styles/orientation.xml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE Map>
|
||||||
|
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
|
||||||
|
|
||||||
|
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||||
|
<StyleName>My Style</StyleName>
|
||||||
|
<Datasource>
|
||||||
|
<Parameter name="type">shape</Parameter>
|
||||||
|
<Parameter name="file">../data/points.shp</Parameter>
|
||||||
|
</Datasource>
|
||||||
|
</Layer>
|
||||||
|
|
||||||
|
<Style name="My Style">
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '1'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="45">"XYZ"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '2'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="90">"XYZ"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '3'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="180">"XYZ"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '4'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="45" dy="10">"Line break"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '5'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="45" dy="10">"XYZ"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '6'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="90" dy="10">"XYZ"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
<Rule>
|
||||||
|
<Filter>[nr] = '7'</Filter>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" orientation="180" dy="10">"XYZ"</TextSymbolizer>
|
||||||
|
<PointSymbolizer allow-overlap="true"/>
|
||||||
|
</Rule>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</Map>
|
|
@ -46,6 +46,7 @@ files = [
|
||||||
{'name': "jalign-auto", 'sizes': [(200, 200)]},
|
{'name': "jalign-auto", 'sizes': [(200, 200)]},
|
||||||
{'name': "line-offset", 'sizes':[(900, 250)],
|
{'name': "line-offset", 'sizes':[(900, 250)],
|
||||||
'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)},
|
'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)},
|
||||||
|
{'name': "orientation", 'sizes': [(800, 200)]}
|
||||||
]
|
]
|
||||||
|
|
||||||
def render(filename, width, height, bbox, quiet=False):
|
def render(filename, width, height, bbox, quiet=False):
|
||||||
|
|
Loading…
Reference in a new issue