[MXD2map-commits] r241:7fbb643d5378
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Aug 9 12:06:19 CEST 2011
details: http://hg.intevation.org/geospatial/mxd2map/rev/7fbb643d5378
changeset: 241:7fbb643d5378
user: raimund renkert <raimund.renkert at intevation.de>
date: Mon Aug 08 17:19:03 2011 +0200
description:
Set fill color to black and transparent if the mxd contains no color.
diffstat:
ChangeLog | 6 +
src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java | 46 ++++++----
2 files changed, 35 insertions(+), 17 deletions(-)
diffs (72 lines):
diff -r b54afdbc5892 -r 7fbb643d5378 ChangeLog
--- a/ChangeLog Mon Aug 08 17:12:22 2011 +0200
+++ b/ChangeLog Mon Aug 08 17:19:03 2011 +0200
@@ -1,3 +1,9 @@
+2011-08-08 Raimund Renkert <raimund.renkert at intevation.de>
+
+ * src/java/de/intevation/mxd/writer/SimpleFillSymbolReader.java:
+ Set fill color to black and transparent if the mxd contains no
+ color.
+
2011-08-08 Raimund Renkert <raimund.renkert at intevation.de>
* src/java/de/intevation/mxd/writer/FillStyleWriter.java:
diff -r b54afdbc5892 -r 7fbb643d5378 src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java
--- a/src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java Mon Aug 08 17:12:22 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java Mon Aug 08 17:19:03 2011 +0200
@@ -113,26 +113,38 @@
}
try {
- if(symbol.getColor() instanceof IRgbColor) {
- IRgbColor color = (IRgbColor)symbol.getColor();
- Color c = new Color (
- color.getRed(),
- color.getGreen(),
- color.getBlue());
- symbolElement.setAttribute("color", String.valueOf(c.getRGB()));
- symbolElement.setAttribute("transparency",
- String.valueOf(color.getTransparency()));
+ if(symbol.getColor().isNullColor()) {
+ symbolElement.setAttribute("color", "0");
+ symbolElement.setAttribute("transparency", "255");
}
else {
- RgbColor col = new RgbColor();
- col.setRGB(symbol.getColor().getRGB());
- Color c = new Color (
- col.getRed(),
- col.getGreen(),
- col.getBlue());
- symbolElement.setAttribute("color", String.valueOf(c.getRGB()));
- symbolElement.setAttribute("transparency",
+ if(symbol.getColor() instanceof IRgbColor) {
+ IRgbColor color = (IRgbColor)symbol.getColor();
+ Color c = new Color (
+ color.getRed(),
+ color.getGreen(),
+ color.getBlue());
+ symbolElement.setAttribute(
+ "color",
+ String.valueOf(c.getRGB()));
+ symbolElement.setAttribute(
+ "transparency",
+ String.valueOf(color.getTransparency()));
+ }
+ else {
+ RgbColor col = new RgbColor();
+ col.setRGB(symbol.getColor().getRGB());
+
+ Color c = new Color (
+ col.getRed(),
+ col.getGreen(),
+ col.getBlue());
+ symbolElement.setAttribute(
+ "color",
+ String.valueOf(c.getRGB()));
+ symbolElement.setAttribute("transparency",
String.valueOf(col.getTransparency()));
+ }
}
}
catch(IOException ioe) {
More information about the MXD2map-commits
mailing list