comparison 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
comparison
equal deleted inserted replaced
31:40c0b4e5f91a 32:8381aa59078e
7 import com.esri.arcgis.display.ISymbol; 7 import com.esri.arcgis.display.ISymbol;
8 import com.esri.arcgis.display.SimpleMarkerSymbol; 8 import com.esri.arcgis.display.SimpleMarkerSymbol;
9 import com.esri.arcgis.display.esriSimpleMarkerStyle; 9 import com.esri.arcgis.display.esriSimpleMarkerStyle;
10 import com.esri.arcgis.display.IRgbColor; 10 import com.esri.arcgis.display.IRgbColor;
11 import com.esri.arcgis.display.RgbColor; 11 import com.esri.arcgis.display.RgbColor;
12 import com.esri.arcgis.display.IColor;
12 13
13 import org.w3c.dom.Element; 14 import org.w3c.dom.Element;
14 15
15 /** 16 /**
16 * Reads simple marker symbol information. 17 * Reads simple marker symbol information.
87 "," + color.getBlue() + ")"); 88 "," + color.getBlue() + ")");
88 symbolElement.setAttribute("transparency", 89 symbolElement.setAttribute("transparency",
89 String.valueOf(color.getTransparency())); 90 String.valueOf(color.getTransparency()));
90 } 91 }
91 else { 92 else {
92 System.out.println("Color type unknown! " + 93 RgbColor col = new RgbColor();
93 symbol.getColor().getClass().toString()); 94 col.setRGB(symbol.getColor().getRGB());
95 symbolElement.setAttribute("color", "(" + col.getRed() +
96 "," + col.getGreen() +
97 "," + col.getBlue() + ")");
98 symbolElement.setAttribute("transparency",
99 String.valueOf(col.getTransparency()));
94 } 100 }
95 101
96 symbolElement.setAttribute("size", String.valueOf(symbol.getSize())); 102 symbolElement.setAttribute("size", String.valueOf(symbol.getSize()));
97 symbolElement.setAttribute("outline_size", 103 symbolElement.setAttribute("outline_size",
98 String.valueOf(symbol.getOutlineSize())); 104 String.valueOf(symbol.getOutlineSize()));
103 "," + color.getBlue() + ")"); 109 "," + color.getBlue() + ")");
104 symbolElement.setAttribute("outline_transparency", 110 symbolElement.setAttribute("outline_transparency",
105 String.valueOf(color.getTransparency())); 111 String.valueOf(color.getTransparency()));
106 } 112 }
107 else { 113 else {
108 System.out.println("Color type unknown! " + 114 RgbColor col = new RgbColor();
109 symbol.getColor().getClass().toString()); 115 col.setRGB(symbol.getOutlineColor().getRGB());
116 symbolElement.setAttribute("outline_color", "(" + col.getRed() +
117 "," + col.getGreen() +
118 "," + col.getBlue() + ")");
119 symbolElement.setAttribute("outline_transparency",
120 String.valueOf(col.getTransparency()));
110 } 121 }
111 122
112 symbolElement.setAttribute("angle", String.valueOf(symbol.getAngle())); 123 symbolElement.setAttribute("angle", String.valueOf(symbol.getAngle()));
113 symbolElement.setAttribute("offset", 124 symbolElement.setAttribute("offset",
114 symbol.getXOffset() + "," + symbol.getYOffset()); 125 symbol.getXOffset() + "," + symbol.getYOffset());
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)