Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] alpha blended shell


Avi!  Don't wait 2 weeks to contact us.

Shell provides a constant alpha only.  That is, Shell.setAlpha() takes an alpha value between 0 and 255.  Shell.setImage() sets the icon for the shell, not the image for the shell.  If you are using setBackgroundImage(), this will fill the background of a control with an image, but won't make the control itself respect the transparency of the image.

Summary:  I don't think you can get what you want from SWT API.  You will need to make low level operating system calls on win32 and the Mac.  On GTK , it might be possible using newer GTK calls and when running the a compositing window namnager.

Finally, you should be asking these questions on eclipse.platform.swt.



Avi Cohen <avicoh@xxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

02/25/2009 02:04 PM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] alpha blended shell





Been banging my head against this for over 2 weeks now...

I'm working on an SWT app that is running on Windows only (for now).
This application uses a PNG image as the background for the main shell (i.e. shell.setImage(img) in conjunction with SWT.NO_TRIM).
The PNG image used as the background has 8-bit per pixel alpha transparency values which I can see when examining its imageData .

The only issue being is that whatever I do I can't get the alpha transparency to kick in and show different alpha levels for different pixels.

In other words, I need a way to do alpha blending of the PNG image with the background on every repaint.

Thanks in advance for any tip/idea,
Avi
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top