Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [draw2d] Drop Shadow
[draw2d] Drop Shadow [message #238058] Wed, 22 August 2007 12:46 Go to next message
Michael Seele is currently offline Michael SeeleFriend
Messages: 124
Registered: July 2009
Senior Member
hi,

i found an articel about drop shadow (for swing) in the web:
http://www.curious-creature.org/2005/07/07/fast-or-good-drop -shadows/

is it possible to convert the DropShadowPanel (from the example) into
draw2d to use it for figures? has somebody some experience with that? or
is there a similar draw2d example?

thanks,
mseele
Re: [draw2d] Drop Shadow [message #238132 is a reply to message #238058] Tue, 28 August 2007 16:04 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Michael,

Check out the SchemeBorder and its hierarchy in draw2d. You can use this to
put a border on your figure with a shadow.

Cheers...
Anthony

"Michael Seele" <mseele@guh-software.de> wrote in message
news:cbc091821cbd8f160b004744e021343f$1@www.eclipse.org...
> hi,
>
> i found an articel about drop shadow (for swing) in the web:
> http://www.curious-creature.org/2005/07/07/fast-or-good-drop -shadows/
>
> is it possible to convert the DropShadowPanel (from the example) into
> draw2d to use it for figures? has somebody some experience with that? or
> is there a similar draw2d example?
>
> thanks,
> mseele
>
Re: [draw2d] Drop Shadow [message #238384 is a reply to message #238058] Sat, 08 September 2007 01:35 Go to previous message
Eclipse UserFriend
Originally posted by: none.ibm.com

Michael,

There's always a trade-off between speed and cost. In this case, they are
caching the entire shadow in an Image. It's fine to do this for a few
figures, but it doesn't scale very well. It should be straightforward to
convert the image construction in this example to an SWT image. With clever
stretching you can do rectangular drop shadows using very small cached
images. You could also draw gradients with varying alpha values or a series
of overlapping, transparent paths.

In GEF 3.3, you can set borders which also paint a background onto any
existing figure (e.g. Label). So, you could implement this shadow effect in
a border rather than as its own "wrapper" figure.

"Michael Seele" <mseele@guh-software.de> wrote in message
news:cbc091821cbd8f160b004744e021343f$1@www.eclipse.org...
> hi,
>
> i found an articel about drop shadow (for swing) in the web:
> http://www.curious-creature.org/2005/07/07/fast-or-good-drop -shadows/
>
> is it possible to convert the DropShadowPanel (from the example) into
> draw2d to use it for figures? has somebody some experience with that? or
> is there a similar draw2d example?
>
> thanks,
> mseele
>
Previous Topic:Problem related to connection ..
Next Topic:Eclipse 3.3.0 GEF fails with IndexOutOfBoundsException - works on Eclipse 3.2.1
Goto Forum:
  


Current Time: Fri Mar 29 10:22:40 GMT 2024

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

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

Back to the top