Login  Register

Fill an ROI with transparent color (alpha value)

Posted by Jan Eglinger-3 on May 21, 2011; 3:25pm
URL: http://imagej.273.s1.nabble.com/Fill-an-ROI-with-transparent-color-alpha-value-tp3684492.html

Dear all,

I'd like to fill an ROI (e.g. rectangle or arrow) with a
half-transparent color (i.e. alpha = 0.5).

How can I do this with Javascript?

I tried with
  ip.setColor(new Color(r/255,g/255,b/255,alpha));
  roi.drawPixels(ip);
which works for TextRois, but when I try similar for other ROIs:
  ip.setColor(new Color(r/255,g/255,b/255,alpha));
  ip.fill(roi);
seems to ignore the alpha value.

Thanks for any hints,
Jan