I have a treetable and have to display some status indicators for
objects in the treetable. The chosen way of doing this (not entirely
my choice) is to overlay the tree icons with small images representing
these states. Increasing the gap between icon and text and drawing in
that space *isn't* an option.
So, I have my images as giffs or png (don't mind) they are relatively
small ~7x7 pixcels with transparent backgrounds. I can draw them Ok.
The problem is that they don't stand out from the tree icon as well as
I'd like. I could surround the image with a border of some other
colour, but this makes it bigger and obscures what's underneath.
Is there som java2d/giff/png magic that would let the transparent
areas be drawn semi opaque to make it look as if the image is actually
above the icon.
This is something of a new area for me, so apologies if the answer to
this is blindingly obvious.
Regards
Steve
ak - 18 Dec 2003 18:11 GMT
make it semiopaque by yourself:
pixel is semiopaque (or semitransparent) if alpha value is 127,
pixel is opaque if alpha value is 255,
pixel is transparent if alpha value is 0.
You can use BufferedImage (with Alpha-channel) or MemoryImageSource for such
things.
____________
http://reader.imagero.com the best java image reader.