VolatileImage and BITMASK

Hi

I remember that in older VM versions VolatileImages cannot have one BITMASK of transparency…

Now I don’t know what is the situation, but when I create images using CreateCompatibleImage (with BITMASK) I cannot take acceleration (the drawings are slow compared with opaque VolatileImages).

Anyone can help?

Many thanks

In version 1.4.x acceleration for TRANSLUSCENT Images is not enabled use this to enable it.

System.setProperty(“sun.java2d.translaccel”, “true”);
System.setProperty(“sun.java2d.ddforcevram”, “true”);

but htis has some minor side effects, diagonal lines will be drawn translusent ( u have to set the alpha channel explicitly or otherwise u will not see them).

Use BITMASK instead this will give u transparency 0=not visible 0xff visible ( only values accepted for alpha channel )

Thanks :slight_smile:

But anyway I’ve ported my lib on JOG and now I really don’t have such problems…