diff src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java @ 32:8381aa59078e

Convert all symbol colors to RgbColor.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 11 Apr 2011 17:07:53 +0200
parents 40c0b4e5f91a
children c51376f8e24c
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java	Mon Apr 11 16:04:03 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java	Mon Apr 11 17:07:53 2011 +0200
@@ -9,6 +9,7 @@
 import com.esri.arcgis.display.esriSimpleMarkerStyle;
 import com.esri.arcgis.display.IRgbColor;
 import com.esri.arcgis.display.RgbColor;
+import com.esri.arcgis.display.IColor;
 
 import org.w3c.dom.Element;
 
@@ -89,8 +90,13 @@
                 String.valueOf(color.getTransparency()));
         }
         else {
-            System.out.println("Color type unknown! " +
-                symbol.getColor().getClass().toString());
+            RgbColor col = new RgbColor();
+            col.setRGB(symbol.getColor().getRGB());
+            symbolElement.setAttribute("color",  "(" + col.getRed() +
+                "," + col.getGreen() +
+                "," + col.getBlue() + ")");
+            symbolElement.setAttribute("transparency",
+                String.valueOf(col.getTransparency()));
         }
 
         symbolElement.setAttribute("size", String.valueOf(symbol.getSize()));
@@ -105,8 +111,13 @@
                 String.valueOf(color.getTransparency()));
         }
         else {
-            System.out.println("Color type unknown! " +
-                               symbol.getColor().getClass().toString());
+            RgbColor col = new RgbColor();
+            col.setRGB(symbol.getOutlineColor().getRGB());
+            symbolElement.setAttribute("outline_color",  "(" + col.getRed() +
+                "," + col.getGreen() +
+                "," + col.getBlue() + ")");
+            symbolElement.setAttribute("outline_transparency",
+                String.valueOf(col.getTransparency()));
         }
 
         symbolElement.setAttribute("angle", String.valueOf(symbol.getAngle()));
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)