Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Widget transparency problems. Been stuck for weeks.
icon9.gif  Widget transparency problems. Been stuck for weeks. [message #754939] Sat, 05 November 2011 14:37 Go to next message
Sean  is currently offline Sean Friend
Messages: 2
Registered: November 2011
Junior Member
Hello everyone,

I've been stuck on designing a custom irregular shaped widget with partial transparency for quite a while. I've tried a few things:

1) Shell + region. This results in a non-anti-aliased edge. The beautiful PNG file that i load up as my widget skin ends up with ugly black jagged edges.

2) 255 semi-transparent Shells + region. This results in a smooth edge. However, my program's main function is to perform screencapture. Java's robot screencapture goes through every single window.. and hence, drops the performance of my program by 30-50%.

3) Shell + gc.drawImage + SWT.NO_TRIM|SWT.NO_BACKGROUND. This results in a smooth edge, with great transparency. However.. once you alternate tab it keeps the background.. Sad
The only way so far that i've been able to update the partially transparent background is by destroying the shell and recreating it.

The only solution that is left to me at this point is to create a square widget with no partial transparency (ie: glass effects).

If anyone can point me in the right direction i will be eternally grateful. Smile

Thanks,
Sean.
Re: Widget transparency problems. Been stuck for weeks. [message #755029 is a reply to message #754939] Mon, 07 November 2011 03:39 Go to previous message
Sean  is currently offline Sean Friend
Messages: 2
Registered: November 2011
Junior Member
shell.setVisible redraws the whole thing correctly.. but if i do this the widget will be flickering an awful lot.

Currently fooling around with:
System.out.println(OS.RedrawWindow(shell.handle, null, 0, OS.RDW_INVALIDATE));

and a few variations with no luck.
Previous Topic:Table.setSortColumn sets column background to grey
Next Topic:Image in Text widget?
Goto Forum:
  


Current Time: Fri Apr 26 12:50:11 GMT 2024

Powered by FUDForum. Page generated in 0.02909 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top