changeset 101:461ee9193097

Write PATTERN to the style if a hatch symbol is used to fill a polygon.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 08 Jun 2011 12:29:26 +0200
parents bab3946a8bdc
children 3ca2ec55fb3b
files ChangeLog src/java/de/intevation/mxd/writer/FillStyleWriter.java
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 08 11:28:36 2011 +0200
+++ b/ChangeLog	Wed Jun 08 12:29:26 2011 +0200
@@ -1,3 +1,9 @@
+2011-06-08  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/FillStyleWriter.java:
+	  Write PATTERN to the style if a hatch symbol is used to fill a
+	  polygon.
+
 2011-06-08  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/reader/FeatureLayerReader.java:
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Wed Jun 08 11:28:36 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Wed Jun 08 12:29:26 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)