[MXD2map-commits] r242:bb25c7a4553e

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 9 13:54:42 CEST 2011


details:   http://hg.intevation.org/geospatial/mxd2map/rev/bb25c7a4553e

changeset: 242:bb25c7a4553e

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

date:      Tue Aug 09 13:50:45 2011 +0200

description:
Refactored outline handling for polygons.


diffstat:

 ChangeLog                                              |   7 ++++++
 src/java/de/intevation/mxd/writer/FillStyleWriter.java |  19 +++++++++--------
 2 files changed, 17 insertions(+), 9 deletions(-)

diffs (45 lines):

diff -r 7fbb643d5378 -r bb25c7a4553e ChangeLog
--- 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 at 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 at intevation.de>
 
 	* src/java/de/intevation/mxd/writer/SimpleFillSymbolReader.java:
diff -r 7fbb643d5378 -r bb25c7a4553e src/java/de/intevation/mxd/writer/FillStyleWriter.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(


More information about the MXD2map-commits mailing list