Mercurial > mxd2map
changeset 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 |
files | ChangeLog src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java |
diffstat | 2 files changed, 20 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Apr 11 16:04:03 2011 +0200 +++ b/ChangeLog Mon Apr 11 17:07:53 2011 +0200 @@ -1,3 +1,8 @@ +2011-04-11 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java: Convert + symbol color to RgbColor and write values to XML document. + 2011-04-11 Raimund Renkert <raimund.renkert@intevation.de> * src/java/de/intevation/mxd/reader/ClassBreakRendererReader.java,
--- 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()));