Re: transparency in PNG images



On 1/9/2011 7:34 AM, Roedy Green wrote:
On Sun, 09 Jan 2011 02:49:44 -0500, "John B. Matthews"
<nospam@xxxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :

  g2d.setComposite(AlphaComposite.Clear);
  g2d.fillRect(x, y, w, h);

that behaves similarly to clearRect. It works on the PNG but leaves a
black region on the screen version.

I think I am going to have to figure out how to use a clip region to
protect the area from being "damaged" in the first place.

I will do a little essay on the problem. What is the default
AlphaComponsite method?
Or refactor your rendering code to render to a BufferedImage, and have your paintComponent method just paint that image.

--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
.