Mercurial > mxd2map
comparison src/java/de/intevation/mxd/writer/FillStyleWriter.java @ 242:bb25c7a4553e
Refactored outline handling for polygons.
author | raimund renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 09 Aug 2011 13:50:45 +0200 |
parents | b54afdbc5892 |
children | df4e0946ef02 |
comparison
equal
deleted
inserted
replaced
241:7fbb643d5378 | 242:bb25c7a4553e |
---|---|
200 | 200 |
201 Color oCol = Color.decode( | 201 Color oCol = Color.decode( |
202 symbolElement.getAttribute("color")); | 202 symbolElement.getAttribute("color")); |
203 | 203 |
204 styleObj outline = new styleObj (cl); | 204 styleObj outline = new styleObj (cl); |
205 if (w < 1.0 && transp > 0) { | 205 if (w < 1.0) { |
206 symbolElement.setAttribute("width", "1"); | 206 symbolElement.setAttribute("width", "1"); |
207 outline.setOutlinecolor(fill); | 207 } |
208 } | 208 colorObj outlinecolor = new colorObj( |
209 else { | 209 oCol.getRed(), |
210 colorObj outlinecolor = new colorObj( | 210 oCol.getGreen(), |
211 oCol.getRed(), | 211 oCol.getBlue(), |
212 oCol.getGreen(), | 212 -4); |
213 oCol.getBlue(), | 213 outline.setOutlinecolor(outlinecolor); |
214 -4); | 214 if(transp >= 0) { |
215 outline.setOutlinecolor(outlinecolor); | 215 int opacity = (int)((1 - (transp/255)) * 100); |
216 outline.setOpacity(opacity); | |
216 } | 217 } |
217 try { | 218 try { |
218 outline.setOutlinewidth(Double.parseDouble( | 219 outline.setOutlinewidth(Double.parseDouble( |
219 symbolElement.getAttribute("width"))); | 220 symbolElement.getAttribute("width"))); |
220 } | 221 } |