Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problem with figures in draw2d
Problem with figures in draw2d [message #236432] Wed, 27 June 2007 17:25 Go to next message
Eclipse UserFriend
Originally posted by: martin.lindblad.gmail.com

Hi!

I'm trying to use gradients on my figures, using draw2d. But I have some
trouble with that. In the paint method of the root figure, I use the
setBackgroundPattern, and to make it visible I call the method
fillRectangle. But that make all my other childfigures disappear because
of the fillRectangle method.
Is there a way to make gradients on figures instead of using the Graphic
object? Or how can I otherwise solve th problem?

Many thanks

Martin
Re: Problem with figures in draw2d [message #236439 is a reply to message #236432] Wed, 27 June 2007 18:37 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Martin,

Attached is an example for a GradientRectangleFigure.

Note that setBackgroundPattern() is not implemented by ScaledGraphics. This
may be a problem for you if you require zoom or print support.

Cheers...
Anthony

"Martin" <martin.lindblad@gmail.com> wrote in message
news:f5u6ij$44t$2@build.eclipse.org...
> Hi!
>
> I'm trying to use gradients on my figures, using draw2d. But I have some
> trouble with that. In the paint method of the root figure, I use the
> setBackgroundPattern, and to make it visible I call the method
> fillRectangle. But that make all my other childfigures disappear because
> of the fillRectangle method.
> Is there a way to make gradients on figures instead of using the Graphic
> object? Or how can I otherwise solve th problem?
>
> Many thanks
>
> Martin


Re: Problem with figures in draw2d [message #236453 is a reply to message #236439] Wed, 27 June 2007 21:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: martin.lindblad.gmail.com

Thanks Anthony

It worked great for all figures except for the root figure that is of
type FreeformLayer. Do you know what to to about that one?

One more thing. I do require zoom, do you know if there is a workaround
for solving that problem?

Thanks again

Martin

Anthony Hunter skrev:
> Hi Martin,
>
> Attached is an example for a GradientRectangleFigure.
>
> Note that setBackgroundPattern() is not implemented by ScaledGraphics. This
> may be a problem for you if you require zoom or print support.
>
> Cheers...
> Anthony
>
> "Martin" <martin.lindblad@gmail.com> wrote in message
> news:f5u6ij$44t$2@build.eclipse.org...
>> Hi!
>>
>> I'm trying to use gradients on my figures, using draw2d. But I have some
>> trouble with that. In the paint method of the root figure, I use the
>> setBackgroundPattern, and to make it visible I call the method
>> fillRectangle. But that make all my other childfigures disappear because
>> of the fillRectangle method.
>> Is there a way to make gradients on figures instead of using the Graphic
>> object? Or how can I otherwise solve th problem?
>>
>> Many thanks
>>
>> Martin
>
>
Re: Problem with figures in draw2d [message #236457 is a reply to message #236453] Thu, 28 June 2007 03:44 Go to previous message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Martin,

How do you propose to draw a gradient on a figure that has no bounds
(FreeformLayer)?

The ScaledGraphics issue is
https://bugs.eclipse.org/bugs/show_bug.cgi?id=132361 , which also has no
proposal yet.

Cheers...
Anthony

"Martin" <martin.lindblad@gmail.com> wrote in message
news:f5uk10$k3r$1@build.eclipse.org...
> Thanks Anthony
>
> It worked great for all figures except for the root figure that is of type
> FreeformLayer. Do you know what to to about that one?
>
> One more thing. I do require zoom, do you know if there is a workaround
> for solving that problem?
>
> Thanks again
>
> Martin
>
> Anthony Hunter skrev:
>> Hi Martin,
>>
>> Attached is an example for a GradientRectangleFigure.
>>
>> Note that setBackgroundPattern() is not implemented by ScaledGraphics.
>> This may be a problem for you if you require zoom or print support.
>>
>> Cheers...
>> Anthony
>>
>> "Martin" <martin.lindblad@gmail.com> wrote in message
>> news:f5u6ij$44t$2@build.eclipse.org...
>>> Hi!
>>>
>>> I'm trying to use gradients on my figures, using draw2d. But I have some
>>> trouble with that. In the paint method of the root figure, I use the
>>> setBackgroundPattern, and to make it visible I call the method
>>> fillRectangle. But that make all my other childfigures disappear because
>>> of the fillRectangle method.
>>> Is there a way to make gradients on figures instead of using the Graphic
>>> object? Or how can I otherwise solve th problem?
>>>
>>> Many thanks
>>>
>>> Martin
>>
Previous Topic:scrollable text
Next Topic:Palette scrollbar resizing on drawer collapse and expand
Goto Forum:
  


Current Time: Thu Aug 11 15:57:32 GMT 2022

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

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

Back to the top