Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Porter-Duff composition support?
Porter-Duff composition support? [message #650847] Wed, 26 January 2011 19:26 Go to next message
Greg Brown is currently offline Greg BrownFriend
Messages: 16
Registered: December 2010
Junior Member
Hi again,
I'm wondering if the GC class provides any API for managing Porter-Duff composition rules. I didn't see one, but maybe I am just missing it.
Thanks,
Greg
Re: Porter-Duff composition support? [message #651014 is a reply to message #650847] Thu, 27 January 2011 13:05 Go to previous messageGo to next message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
Hi,

I'm not sure if you are looking for alpha blending. If so, see examples below (they use GC.setAlpha()) --
--> Advanced Graphics Example
--> Alpha Tab . You can see this in action by running the Graphics example


Lakshmi P Shanmugam

[Updated on: Thu, 27 January 2011 13:07]

Report message to a moderator

Re: Porter-Duff composition support? [message #651036 is a reply to message #651014] Thu, 27 January 2011 14:31 Go to previous messageGo to next message
Greg Brown is currently offline Greg BrownFriend
Messages: 16
Registered: December 2010
Junior Member
Alpha blending is part of it, but there are other rules that can be applied that define how overlapping shapes should be painted:

http://en.wikipedia.org/wiki/Porter-Duff

AWT represents these compositing rules in the AlphaComposite class:

http://download.oracle.com/javase/6/docs/api/java/awt/AlphaC omposite.html

I was just wondering if there was an equivalent in SWT.

Greg
Re: Porter-Duff composition support? [message #769704 is a reply to message #651036] Thu, 22 December 2011 14:59 Go to previous message
Jim Mayer is currently offline Jim MayerFriend
Messages: 18
Registered: July 2009
Junior Member
The Porter Duff rules appear to be fully supported in Cairo. Support in SWT would allow the creation and manipulation of transparent images with the standard, hardware supported, graphics libraries. This would be a huge win for both ease of use and performance compared to the current, pixel by pixel manipulations required by the current API.

Are there any important SWT target platforms that don't support compositing rules now?

-- Jim
Previous Topic:Center text on a Label with a background Image
Next Topic:Source Attachment for SWT and JFace
Goto Forum:
  


Current Time: Thu Apr 25 16:02:27 GMT 2024

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

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

Back to the top