Mercurial > mxd2map
diff src/java/de/intevation/mxd/writer/LineStyleWriter.java @ 122:f0a72d232aa8
Set PATTERN for line symbols.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 17 Jun 2011 12:30:21 +0200 |
parents | 11d63bf00326 |
children | cd18c61cbcf6 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/LineStyleWriter.java Thu Jun 16 18:36:48 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/LineStyleWriter.java Fri Jun 17 12:30:21 2011 +0200 @@ -68,30 +68,27 @@ symbolObj sym = symbolSet.getSymbolByName(name); //The following lines are for dashed and/or dotted lines. - //These lines throw an "incorrect array size" error. - //TODO Find out how to set the pattern correctly.(Remove the "&& false" - //to use this block). - if(symbolElement.hasAttribute("linestyle") && false) { + if(symbolElement.hasAttribute("linestyle")) { String ls = symbolElement.getAttribute("linestyle"); double[] vals; if(ls.equals("dash")) { style.setPatternlength(2); - vals = new double[] {2.0, 2.0}; + vals = new double[] {4.0, 4.0, 0, 0, 0, 0, 0, 0, 0, 0}; style.setPattern(vals); } else if(ls.equals("dot")) { style.setPatternlength(2); - vals = new double[] {1.0, 2.0}; + vals = new double[] {1.0, 4.0, 0, 0, 0, 0, 0, 0, 0, 0}; style.setPattern(vals); } else if(ls.equals("dashdot")) { style.setPatternlength(4); - vals = new double[] {2.0, 2.0, 1.0, 2.0}; + vals = new double[] {5.0, 4.0, 1.0, 4.0, 0, 0, 0, 0, 0, 0}; style.setPattern(vals); } else if (ls.equals("dashdotdot")) { style.setPatternlength(6); - vals = new double[] {2.0, 2.0, 1.0, 2.0, 1.0, 2.0}; + vals = new double[] {5.0, 4.0, 1.0, 3.0, 1.0, 4.0, 0, 0, 0, 0}; style.setPattern(vals); } }