Skip to main content



      Home
Home » Eclipse Projects » GEF » 50% "Shading" figures
50% "Shading" figures [message #180653] Mon, 09 May 2005 12:40 Go to next message
Eclipse UserFriend
Originally posted by: Craig.OfficeExtend.com

I'm building a form designer and have a reason to 50% color various figures
in my diagram. What I mean by that would be to have the figure paint itself
normally and then drop 50% shading (half-transparent) over the the result.

Best approach?
Re: 50% "Shading" figures [message #180684 is a reply to message #180653] Mon, 09 May 2005 13:38 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.officeextend.com

I think I may have found my answer in the SelectorFigure class using a
single pixel image with a SetAlpha of (55) and then drawing that image
over the figure's bounds.
Re: 50% "Shading" figures [message #180693 is a reply to message #180653] Mon, 09 May 2005 13:33 Go to previous message
Eclipse UserFriend
Have you looked at the thumbnail in the outline for the logic example?
That's probably the best way to do it. Look at
ScrollableThumbnail.SelectorFigure. It creates a one-pixel image with the
desired alpha, and then stretches it over the desired area.

SWT has new API in 3.1 that allows you to do this (so you wouldn't have to
create an Image), but I believe there are some serious problems with that.
It enables GDI+ (on Windows; might not work on other platforms), which
incurs huge performance hits (among other things). Randy would be able to
give you a more accurate report about using this feature. We might not
expose that new API for 3.1.

"Craig Fransen" <Craig@OfficeExtend.com> wrote in message
news:d5o49r$heu$1@news.eclipse.org...
> I'm building a form designer and have a reason to 50% color various
figures
> in my diagram. What I mean by that would be to have the figure paint
itself
> normally and then drop 50% shading (half-transparent) over the the result.
>
> Best approach?
>
>
Previous Topic:sharing objects between models
Next Topic:Making GEF's EDiagram extensible
Goto Forum:
  


Current Time: Fri Jul 25 01:45:35 EDT 2025

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

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

Back to the top