From c217264c40c4717d327573b770e5029acacaea48 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Fri, 13 Jul 2012 09:59:51 +0300 Subject: [PATCH] add smooth only if it's set in stylesheet (max) --- src/libkomapnik.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/libkomapnik.py b/src/libkomapnik.py index 34b142f..228cb00 100644 --- a/src/libkomapnik.py +++ b/src/libkomapnik.py @@ -94,19 +94,28 @@ def xml_linesymbolizer(color="#000000", width="1", opacity="1", linecap="butt", dashes = 'stroke-dasharray="%s"'%(dashes) else: dashes = "" + + if smooth: + smooth = 'smooth="%s"'%(smooth) + else: + smooth = "" + rasterizer = "" # if float(width) < 4 and not dashes and zoom < 6: # rasterizer = ' rasterizer="fast"' return """ - """%(rasterizer, smooth, color, float(width), float(opacity), linejoin, linecap, dashes) + """%(rasterizer, smooth, color, float(width), float(opacity), linejoin, linecap, dashes) def xml_polygonsymbolizer(color="#000000", opacity="1", smooth='0'): color = nicecolor(color) - + if smooth: + smooth = 'smooth="%s"'%(smooth) + else: + smooth = "" return """ - """%(color, float(opacity), smooth) + """%(color, float(opacity), smooth) def xml_polygonpatternsymbolizer(file=""): return """