|Using PNG with Alpha channel in SWT Widgets [message #446617]
||Mon, 29 November 2004 16:50
Originally posted by: vinodhd.gmail.com|
I am trying to display PNG icons with alpha channel on my swt.Tree widget.
The code looks something like this:
adminItem = new TreeItem(adminTree, 0);
icon = new Image(PlatformUI.getWorkbench().getDisplay(),
Now when I ran this, I saw that the alpha channel was not used at all and I
got a black background. I tried converting the PNG to Windows ICON .ico
file and I got the transparency but it was a little jagged. The ICON was in
Windows XP style icon with 8 bit alpha channel. I think the alpha channel
was reduced to one bit.
Is it possible to load a PNG with alpha channel and use it in widgets like
Tree? If I set the TransparentPixel it works, but then without the alpha
channel I lose the visual excellence of the images.
I was wondering how eclipse uses Images in it's IDE. Can someone give me
some pointers to proceed with?
Powered by FUDForum
. Page generated in 0.01453 seconds