# HG changeset patch # User raimund renkert # Date 1312816342 -7200 # Node ID b54afdbc589206593bf69f113cc12aa6aff51ae0 # Parent 8aefef8a16268388a84504257ebcfb7f1c4690df Set opacity for simple polygons in a range from 0 - 100. 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 + + * src/java/de/intevation/mxd/writer/FillStyleWriter.java: + Set opacity for simple polygons in a range from 0 - 100. + 2011-08-08 Raimund Renkert * 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");