Transparent Fill in Circle
Posted by ganeshjothikumar on Aug 02, 2007; 6:55am
URL: http://imagej.273.s1.nabble.com/Transparent-Fill-in-Circle-tp3698726.html
Hi All
I have an image and I have drawn a circle on the image using Oval Roi and filled it with a random colour. Code snippet is below
> ImagePlus imp = WindowManager.getCurrentImage();
> ip = imp.getProcessor();
> Roi roi = new OvalRoi(10,10,100,100);
> ip.setColor(new Color(13,14,23));
> ip.setMask(roi.getMask());
> ip.setRoi(roi.getBoundingRect());
> ip.fill(ip.getMask());
> imp.updateAndDraw();
Now when the circle is filled it is opaque and it hides the portion of the image over which it is dawn. Nw I want it to be tranparent so that the circl is also filles with colour and at the same time the image bhind is also seen transparently.. Is there a way to do this... Any help is most welcome
Thanks in advance
ganesh
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.