diff --git a/demo/test/charplacement.py b/demo/test/charplacement.py index 6f893033f..b3a9f4555 100644 --- a/demo/test/charplacement.py +++ b/demo/test/charplacement.py @@ -42,7 +42,7 @@ road_rule.symbols.append(LineSymbolizer(road_stroke)) 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 @@ im = Image(m.width,m.height) 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" diff --git a/demo/test/displacement.py b/demo/test/displacement.py index 5e2282611..185a5f8b0 100644 --- a/demo/test/displacement.py +++ b/demo/test/displacement.py @@ -43,7 +43,7 @@ road_rule.symbols.append(LineSymbolizer(road_stroke)) 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 @@ im = Image(m.width,m.height) 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" diff --git a/demo/test/overlap.py b/demo/test/overlap.py index a1d28a9fd..291159eb7 100644 --- a/demo/test/overlap.py +++ b/demo/test/overlap.py @@ -44,7 +44,7 @@ road_rule.symbols.append(LineSymbolizer(road_stroke)) 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 @@ im = Image(m.width,m.height) 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" diff --git a/demo/test/textspacing.py b/demo/test/textspacing.py index 482ee4066..0d01e149f 100644 --- a/demo/test/textspacing.py +++ b/demo/test/textspacing.py @@ -43,7 +43,7 @@ road_rule.symbols.append(LineSymbolizer(road_stroke)) 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 @@ im = Image(m.width,m.height) 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"