Revision 10450 branches/simbologia/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/MultiLayerFillSymbol.java

View differences:

MultiLayerFillSymbol.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.1.2.2  2007-02-21 07:34:09  jaume
46
* Revision 1.1.2.3  2007-02-21 16:09:02  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.1.2.2  2007/02/21 07:34:09  jaume
47 50
* labeling starts working
48 51
*
49 52
* Revision 1.1.2.1  2007/02/16 10:54:12  jaume
......
259 262
		layers = (IFillSymbol[])lst.toArray(new IFillSymbol[0]);
260 263
		return contains;
261 264
	}
265

  
266
	public int getFillAlpha() {
267
		// will compute the acumulated opacity
268
		double myAlpha = 0;
269
		for (int i = 0; i < layers.length; i++) {
270
			double layerAlpha = layers[i].getFillAlpha()/255D;
271
			myAlpha += (1-myAlpha)*layerAlpha;
272
		}
273
		int result = (int) Math.round(myAlpha * 255); 
274
		return (result>255) ? 255 : result;
275
	}
262 276
	
263 277
}

Also available in: Unified diff