Mercurial > mxd2map
diff src/java/de/intevation/mxd/writer/FillStyleWriter.java @ 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 | c79c3c6fc99a |
children | bb25c7a4553e |
line wrap: on
line diff
--- 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");