Mercurial > mxd2map
changeset 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 | d7c8493cb345 |
files | ChangeLog src/java/de/intevation/mxd/writer/FillStyleWriter.java |
diffstat | 2 files changed, 29 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 05 15:41:01 2011 +0200 +++ b/ChangeLog Tue Jul 05 17:22:03 2011 +0200 @@ -1,3 +1,8 @@ +2011-07-05 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/writer/FillStyleWriter.java: + Write line width and outline for polygons filled with hatch symbol. + 2011-07-05 Raimund Renkert <raimund.renkert@intevation.de> * src/java/de/intevation/mxd/writer/FillStyleWriter.java:
--- 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"));