Permalink
Browse files

update the demo/tests - refs #1460

  • Loading branch information...
1 parent f29726e commit 28063e28aaf7217d4b42069fb5649979783f3114 Dane Springmeyer committed Sep 3, 2012
Showing with 8 additions and 8 deletions.
  1. +2 −2 demo/test/charplacement.py
  2. +2 −2 demo/test/displacement.py
  3. +2 −2 demo/test/overlap.py
  4. +2 −2 demo/test/textspacing.py
@@ -42,7 +42,7 @@
road_style.rules.append(road_rule);
#Road text
-text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 20, Color('black'))
+text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 20, Color('black'))
text_symbolizer.label_placement=label_placement.LINE_PLACEMENT
text_symbolizer.minimum_distance = 0
#text_symbolizer.max_char_angle_delta = 40
@@ -77,6 +77,6 @@
render(m, im)
# Save image to file
-save_to_file('output.png', 'png',im) # true-colour RGBA
+im.save('output.png') # true-colour RGBA
print "Done\n"
@@ -43,7 +43,7 @@
road_style.rules.append(road_rule);
#Road text
-text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 10, Color('black'))
+text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 10, Color('black'))
text_symbolizer.label_placement=label_placement.LINE_PLACEMENT
text_symbolizer.minimum_distance = 0
#text_symbolizer.max_char_angle_delta = 40
@@ -78,6 +78,6 @@
render(m, im)
# Save image to file
-save_to_file('output.png', 'png',im) # true-colour RGBA
+im.save('output.png') # true-colour RGBA
print "Done\n"
View
@@ -44,7 +44,7 @@
road_style.rules.append(road_rule);
#Road text
-text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 10, Color('black'))
+text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 10, Color('black'))
text_symbolizer.label_placement=label_placement.LINE_PLACEMENT
text_symbolizer.minimum_distance = 0
#text_symbolizer.max_char_angle_delta = 40
@@ -79,6 +79,6 @@
render(m, im)
# Save image to file
-save_to_file('output.png', 'png',im) # true-colour RGBA
+im.save('output.png') # true-colour RGBA
print "Done\n"
View
@@ -43,7 +43,7 @@
road_style.rules.append(road_rule);
#Road text
-text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 10, Color('black'))
+text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 10, Color('black'))
text_symbolizer.label_placement=label_placement.LINE_PLACEMENT
text_symbolizer.minimum_distance = 0
#text_symbolizer.max_char_angle_delta = 40
@@ -77,6 +77,6 @@
render(m, im)
# Save image to file
-save_to_file('output.png', 'png',im) # true-colour RGBA
+im.save('output.png') # true-colour RGBA
print "Done\n"

0 comments on commit 28063e2

Please sign in to comment.