changeset 240:b54afdbc5892

Set opacity for simple polygons in a range from 0 - 100.
author raimund renkert <raimund.renkert@intevation.de>
date Mon, 08 Aug 2011 17:12:22 +0200
parents 8aefef8a1626
children 7fbb643d5378
files ChangeLog src/java/de/intevation/mxd/writer/FillStyleWriter.java
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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@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@intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.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");
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)