Mercurial > mxd2map
diff 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 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java Tue Jul 05 15:41:01 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java Tue Jul 05 17:22:03 2011 +0200 @@ -91,17 +91,22 @@ } else if (nextSym.getTagName().equals("symbol") && symbolElement.hasAttribute("hatch")) { - if(symbolElement.hasAttribute("angle")) { - nextSym.setAttribute( - "angle", - symbolElement.getAttribute("angle")); + if(i == 0) { + writeOutline(nextSym); } - if(symbolElement.hasAttribute("separation")) { - nextSym.setAttribute( - "size", - symbolElement.getAttribute("separation")); + else { + if(symbolElement.hasAttribute("angle")) { + nextSym.setAttribute( + "angle", + symbolElement.getAttribute("angle")); + } + if(symbolElement.hasAttribute("separation")) { + nextSym.setAttribute( + "size", + symbolElement.getAttribute("separation")); + } + writeMarker(nextSym, -1); } - writeMarker(nextSym, -1); } else { writeSimple(symbolElement); @@ -292,6 +297,16 @@ style.setGap(gap - size); } } + if(symbolElement.hasAttribute("width")) { + double width = 1; + try { + width = Double.parseDouble(symbolElement.getAttribute("width")); + } + catch(NumberFormatException nfe) { + width = 1.0; + } + style.setWidth(width); + } if(symbolElement.hasAttribute("outline_color")) { Color oCol = Color.decode( symbolElement.getAttribute("outline_color"));