Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to add color gradient to a figure ( can't call getGC from Figure ?)
How to add color gradient to a figure ( can't call getGC from Figure ?) [message #195255] Thu, 08 September 2005 20:31 Go to next message
Eclipse UserFriend
Originally posted by: Philomena.Sidle.cinci.rr.com

Hi,

I am trying to add color gradient to a figure. I think that I can use
GC.fillGradientRectangle to add the gradient and there is a static
method FigureUtitlite.getGC() to get my GC. However the getGC static
method is deprecated. Is there other alternatives ?

Thanks for any info.
-- Philomena Sidle--
Re: How to add color gradient to a figure ( can't call getGC from Figure ?) [message #195261 is a reply to message #195255] Thu, 08 September 2005 21:22 Go to previous message
Fabian Wolf is currently offline Fabian WolfFriend
Messages: 96
Registered: July 2009
Member
Philomena Sidle wrote:

> Hi,
>
> I am trying to add color gradient to a figure. I think that I can use
> GC.fillGradientRectangle to add the gradient and there is a static
> method FigureUtitlite.getGC() to get my GC. However the getGC static
> method is deprecated. Is there other alternatives ?

You should be overwriting your figure's paintFigure(Graphics g) method which
provides you with the necessary Graphics object which in turn has a method
fillGradient(...)

Hope that helps...

Fabian
Previous Topic:Content pane will grow but won't shrink
Next Topic:object selection
Goto Forum:
  


Current Time: Fri Jan 24 08:05:52 GMT 2025

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

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

Back to the top