[MXD2map-commits] r240:b54afdbc5892

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/b54afdbc5892

changeset: 240:b54afdbc5892

user:      raimund renkert <raimund.renkert at intevation.de>

date:      Mon Aug 08 17:12:22 2011 +0200

description:
Set opacity for simple polygons in a range from 0 - 100.


diffstat:

 ChangeLog                                              |  5 +++++
 src/java/de/intevation/mxd/writer/FillStyleWriter.java |  6 ++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 8aefef8a1626 -r b54afdbc5892 ChangeLog
--- a/ChangeLog	Mon Aug 08 17:09:06 2011 +0200
+++ b/ChangeLog	Mon Aug 08 17:12:22 2011 +0200
@@ -1,3 +1,8 @@
+2011-08-08  Raimund Renkert  <raimund.renkert at intevation.de>
+
+	* src/java/de/intevation/mxd/writer/FillStyleWriter.java:
+	  Set opacity for simple polygons in a range from 0 - 100.
+
 2011-08-08  Raimund Renkert  <raimund.renkert at intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
diff -r 8aefef8a1626 -r b54afdbc5892 src/java/de/intevation/mxd/writer/FillStyleWriter.java
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Aug 08 17:09:06 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Aug 08 17:12:22 2011 +0200
@@ -414,10 +414,8 @@
             catch(NumberFormatException nfe) {
                 value = 0;
             }
-            int opacity = (int)(value/255) * 100;
-            if(value >= 0) {
-                style.setOpacity(opacity);
-            }
+            int opacity = (int)(1 - (value/255)) * 100;
+            style.setOpacity(opacity);
         }
         if(symbolElement.hasAttribute("color")) {
             String c = symbolElement.getAttribute("color");


More information about the MXD2map-commits mailing list