diff src/java/de/intevation/mxd/writer/FillStyleWriter.java @ 109:dca5f208500f

Merged with raimunds changes
author Stephan Holl <stephan.holl@intevation.de>
date Tue, 14 Jun 2011 12:37:03 +0200
parents 461ee9193097
children 11d63bf00326
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Tue Jun 14 12:35:36 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Tue Jun 14 12:37:03 2011 +0200
@@ -183,6 +183,30 @@
             style.setOutlinewidth(Double.parseDouble(
                 symbolElement.getAttribute("outline_size")));
         }
+        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};
+                style.setPattern(vals);
+            }
+            else if(ls.equals("dot")) {
+                style.setPatternlength(2);
+                vals = new double[] {1.0, 2.0};
+                style.setPattern(vals);
+            }
+            else if(ls.equals("dashdot")) {
+                style.setPatternlength(4);
+                vals = new double[] {2.0, 2.0, 1.0, 2.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};
+                style.setPattern(vals);
+            }
+        }
 
         if(type.equals("marker")) {
             style.setSymbolByName(map, name);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)