comparison 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
comparison
equal deleted inserted replaced
239:8aefef8a1626 240:b54afdbc5892
412 symbolElement.getAttribute("transparency")); 412 symbolElement.getAttribute("transparency"));
413 } 413 }
414 catch(NumberFormatException nfe) { 414 catch(NumberFormatException nfe) {
415 value = 0; 415 value = 0;
416 } 416 }
417 int opacity = (int)(value/255) * 100; 417 int opacity = (int)(1 - (value/255)) * 100;
418 if(value >= 0) { 418 style.setOpacity(opacity);
419 style.setOpacity(opacity);
420 }
421 } 419 }
422 if(symbolElement.hasAttribute("color")) { 420 if(symbolElement.hasAttribute("color")) {
423 String c = symbolElement.getAttribute("color"); 421 String c = symbolElement.getAttribute("color");
424 Color col = Color.decode(c); 422 Color col = Color.decode(c);
425 colorObj color = new colorObj( 423 colorObj color = new colorObj(
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)