changeset 242:bb25c7a4553e

Refactored outline handling for polygons.
author raimund renkert <raimund.renkert@intevation.de>
date Tue, 09 Aug 2011 13:50:45 +0200 (2011-08-09)
parents 7fbb643d5378
children df4e0946ef02
files ChangeLog src/java/de/intevation/mxd/writer/FillStyleWriter.java
diffstat 2 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Aug 08 17:19:03 2011 +0200
+++ b/ChangeLog	Tue Aug 09 13:50:45 2011 +0200
@@ -1,3 +1,10 @@
+2011-08-09  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/FillStyleWriter.java:
+	  Set the outline width to an integer with a min value of 1, do not
+	  set the outline color to fill color and set transparency for
+	  outlines.
+
 2011-08-08  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/writer/SimpleFillSymbolReader.java:
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Aug 08 17:19:03 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Tue Aug 09 13:50:45 2011 +0200
@@ -202,17 +202,18 @@
             symbolElement.getAttribute("color"));
 
         styleObj outline = new styleObj (cl);
-        if (w < 1.0 && transp > 0) {
+        if (w < 1.0) {
             symbolElement.setAttribute("width", "1");
-            outline.setOutlinecolor(fill);
         }
-        else {
-            colorObj outlinecolor = new colorObj(
-                oCol.getRed(),
-                oCol.getGreen(),
-                oCol.getBlue(),
-                -4);
-            outline.setOutlinecolor(outlinecolor);
+        colorObj outlinecolor = new colorObj(
+            oCol.getRed(),
+            oCol.getGreen(),
+            oCol.getBlue(),
+            -4);
+        outline.setOutlinecolor(outlinecolor);
+        if(transp >= 0) {
+            int opacity = (int)((1 - (transp/255)) * 100);
+            outline.setOpacity(opacity); 
         }
         try {
             outline.setOutlinewidth(Double.parseDouble(
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)