diff src/java/de/intevation/mxd/writer/SymbolWriter.java @ 97:18e4f143896b

Added polygon writer.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 06 Jun 2011 17:24:43 +0200
parents c285ed08b72c
children 11d63bf00326
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/SymbolWriter.java	Wed Jun 01 14:21:24 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/SymbolWriter.java	Mon Jun 06 17:24:43 2011 +0200
@@ -46,8 +46,8 @@
 
         String name = symbolElement.getAttribute("name");
         symbolObj sym = symbolSet.getSymbolByName(name);
-
         String symType = symbolElement.getAttribute("style");
+        String type = symbolElement.getAttribute("type");
         if(symType.equals("point")) {
             writeSimple(sym);
         }
@@ -58,6 +58,9 @@
             //TODO Does not work at all...  waiting for fix.
             writeCharacter(sym, symbolElement);
         }
+        else if (type.equals("line")) {
+            writeHatch(sym);
+        }
         else {
             return false;
         }
@@ -104,10 +107,16 @@
         symbol.setCharacter("&#" + symbolElement.getAttribute("char") + ";");
     }
 
+    private void writeHatch(symbolObj symbol) {
+        logger.debug("writeHatch(symbolObj)");
+        symbol.setType(MS_SYMBOL_TYPE.MS_SYMBOL_HATCH.swigValue());
+    }
+
     public boolean canWrite(String type) {
         if (type.equals("point") ||
             type.equals("arrow") ||
-            type.equals("char")) {
+            type.equals("char") ||
+            type.equals("line")) {
             return true;
         }
         else {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)