Mercurial > mxd2map
comparison src/java/de/intevation/mxd/writer/FillStyleWriter.java @ 168:f3a539ace2a4
Write line width and outline for polygons filled with hatch symbol.
author | vc11884admin@VC11884.win.bsh.de |
---|---|
date | Tue, 05 Jul 2011 17:22:03 +0200 |
parents | b1e4a871033e |
children | f4eb506499f5 |
comparison
equal
deleted
inserted
replaced
167:b1e4a871033e | 168:f3a539ace2a4 |
---|---|
89 } | 89 } |
90 writeMarker(nextSym, gap); | 90 writeMarker(nextSym, gap); |
91 } | 91 } |
92 else if (nextSym.getTagName().equals("symbol") && | 92 else if (nextSym.getTagName().equals("symbol") && |
93 symbolElement.hasAttribute("hatch")) { | 93 symbolElement.hasAttribute("hatch")) { |
94 if(symbolElement.hasAttribute("angle")) { | 94 if(i == 0) { |
95 nextSym.setAttribute( | 95 writeOutline(nextSym); |
96 "angle", | 96 } |
97 symbolElement.getAttribute("angle")); | 97 else { |
98 } | 98 if(symbolElement.hasAttribute("angle")) { |
99 if(symbolElement.hasAttribute("separation")) { | 99 nextSym.setAttribute( |
100 nextSym.setAttribute( | 100 "angle", |
101 "size", | 101 symbolElement.getAttribute("angle")); |
102 symbolElement.getAttribute("separation")); | 102 } |
103 } | 103 if(symbolElement.hasAttribute("separation")) { |
104 writeMarker(nextSym, -1); | 104 nextSym.setAttribute( |
105 "size", | |
106 symbolElement.getAttribute("separation")); | |
107 } | |
108 writeMarker(nextSym, -1); | |
109 } | |
105 } | 110 } |
106 else { | 111 else { |
107 writeSimple(symbolElement); | 112 writeSimple(symbolElement); |
108 } | 113 } |
109 } | 114 } |
290 //the separation - size | 295 //the separation - size |
291 if (gap > 0) { | 296 if (gap > 0) { |
292 style.setGap(gap - size); | 297 style.setGap(gap - size); |
293 } | 298 } |
294 } | 299 } |
300 if(symbolElement.hasAttribute("width")) { | |
301 double width = 1; | |
302 try { | |
303 width = Double.parseDouble(symbolElement.getAttribute("width")); | |
304 } | |
305 catch(NumberFormatException nfe) { | |
306 width = 1.0; | |
307 } | |
308 style.setWidth(width); | |
309 } | |
295 if(symbolElement.hasAttribute("outline_color")) { | 310 if(symbolElement.hasAttribute("outline_color")) { |
296 Color oCol = Color.decode( | 311 Color oCol = Color.decode( |
297 symbolElement.getAttribute("outline_color")); | 312 symbolElement.getAttribute("outline_color")); |
298 colorObj outlineColor = new colorObj( | 313 colorObj outlineColor = new colorObj( |
299 oCol.getRed(), | 314 oCol.getRed(), |