use of alpha channel
Posted by Francesco De Comite on Dec 16, 2008; 12:56pm
URL: http://imagej.273.s1.nabble.com/use-of-alpha-channel-tp3694244.html
Hi,
I would like to draw overlapping shapes, where the colors of both
overlapping objects mix.
I tried using the alpha channel one can define inside a awt.Color
object, as you can see in the following code :
(primeIP is a ColorProcessor)
> setProcessor("Verifying", primeIP);
> primeIP.setColor(new java.awt.Color(1f,0f,0f,0.5f));
> primeIP.fillOval(100, 100, 300, 300);
> primeIP.setColor(new java.awt.Color(0f,0f,1f,0.5f));
> primeIP.fillOval(200, 100, 300, 300);
but... nothing happens, the second circle is drawn over the first one,
with no colour mix.
Am I asking too much from imageJ, or do I miss something ?
--
Francesco De Comite
tel (33) 03 28 77 85 72
fax (33) 03 28 77 85 37
www.lifl.fr/~decomite