Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » coping with gradients and ScaledGraphics ?
coping with gradients and ScaledGraphics ? [message #243422] Fri, 06 June 2008 17:58 Go to next message
Eclipse UserFriend
Originally posted by: max.andersen.redhat.com

Hi guys,

I'm having "fun" with Gef and doing some nice gradients with
setBackgroundPattern() - all looking nice and pretty...

Just until I start using the outline view which uses a ScaledGraphics to
give an "overview" map and getting exceptions
because ScaledGraphics does not support backgroundPattern.

I solved it currently by doing an instanceof check in paintfigure to avoid
the backgroundpattern in the outline view.

Is that really the only way around this ? Is there a "better"
scaledGraphics implementation somewhere ?

I'm also worried what happens when I start printing etc. ?

/max
Re: coping with gradients and ScaledGraphics ? [message #243477 is a reply to message #243422] Mon, 09 June 2008 15:22 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Max,

I am not totally familiar with the history behind ScaledGraphics, but a
number of these SWT features do not scale so are not supported by
ScaledGraphics.

I have a question for you though.

You are able to show a gradient in your editor, do you have support to scale
your editor (zoom)? Are you using SWTGraphics?

Can you raise a Bugzilla for this? Not sure if there is one already.

Cheers...
Anthony

"Max Rydahl Andersen" <max.andersen@redhat.com> wrote in message
news:op.ucb9jvemw1tq5a@reddevil...
> Hi guys,
>
> I'm having "fun" with Gef and doing some nice gradients with
> setBackgroundPattern() - all looking nice and pretty...
>
> Just until I start using the outline view which uses a ScaledGraphics to
> give an "overview" map and getting exceptions
> because ScaledGraphics does not support backgroundPattern.
>
> I solved it currently by doing an instanceof check in paintfigure to avoid
> the backgroundpattern in the outline view.
>
> Is that really the only way around this ? Is there a "better"
> scaledGraphics implementation somewhere ?
>
> I'm also worried what happens when I start printing etc. ?
>
> /max
Re: coping with gradients and ScaledGraphics ? [message #243535 is a reply to message #243477] Wed, 11 June 2008 13:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: max.andersen.redhat.com

> I am not totally familiar with the history behind ScaledGraphics, but a
> number of these SWT features do not scale so are not supported by
> ScaledGraphics.

yes, but an approximation would be good ;)

> I have a question for you though.
>
> You are able to show a gradient in your editor, do you have support to
> scale
> your editor (zoom)? Are you using SWTGraphics?

We use a org.eclipse.draw2d.parts.Thumbnail (which in turn uses a
ScaledGraphics) to show a "birds-view" map of the graph
in the outline view which the user can use to quickly navigate somewhere
else.

Do you know any better way ?

> Can you raise a Bugzilla for this? Not sure if there is one already.

Will do.

/max

> Cheers...
> Anthony
>
> "Max Rydahl Andersen" <max.andersen@redhat.com> wrote in message
> news:op.ucb9jvemw1tq5a@reddevil...
>> Hi guys,
>>
>> I'm having "fun" with Gef and doing some nice gradients with
>> setBackgroundPattern() - all looking nice and pretty...
>>
>> Just until I start using the outline view which uses a ScaledGraphics to
>> give an "overview" map and getting exceptions
>> because ScaledGraphics does not support backgroundPattern.
>>
>> I solved it currently by doing an instanceof check in paintfigure to
>> avoid
>> the backgroundpattern in the outline view.
>>
>> Is that really the only way around this ? Is there a "better"
>> scaledGraphics implementation somewhere ?
>>
>> I'm also worried what happens when I start printing etc. ?
>>
>> /max
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: coping with gradients and ScaledGraphics ? [message #243539 is a reply to message #243535] Wed, 11 June 2008 13:47 Go to previous message
Eclipse UserFriend
Originally posted by: max.andersen.redhat.com

There were an existing bug for this (albeit with a bad title):

https://bugs.eclipse.org/bugs/show_bug.cgi?id=184651

/max

>> I am not totally familiar with the history behind ScaledGraphics, but a
>> number of these SWT features do not scale so are not supported by
>> ScaledGraphics.
>
> yes, but an approximation would be good ;)
>
>> I have a question for you though.
>>
>> You are able to show a gradient in your editor, do you have support to
>> scale
>> your editor (zoom)? Are you using SWTGraphics?
>
> We use a org.eclipse.draw2d.parts.Thumbnail (which in turn uses a
> ScaledGraphics) to show a "birds-view" map of the graph
> in the outline view which the user can use to quickly navigate somewhere
> else.
>
> Do you know any better way ?
>
>> Can you raise a Bugzilla for this? Not sure if there is one already.
>
> Will do.
>
> /max
>
>> Cheers...
>> Anthony
>>
>> "Max Rydahl Andersen" <max.andersen@redhat.com> wrote in message
>> news:op.ucb9jvemw1tq5a@reddevil...
>>> Hi guys,
>>>
>>> I'm having "fun" with Gef and doing some nice gradients with
>>> setBackgroundPattern() - all looking nice and pretty...
>>>
>>> Just until I start using the outline view which uses a ScaledGraphics
>>> to
>>> give an "overview" map and getting exceptions
>>> because ScaledGraphics does not support backgroundPattern.
>>>
>>> I solved it currently by doing an instanceof check in paintfigure to
>>> avoid
>>> the backgroundpattern in the outline view.
>>>
>>> Is that really the only way around this ? Is there a "better"
>>> scaledGraphics implementation somewhere ?
>>>
>>> I'm also worried what happens when I start printing etc. ?
>>>
>>> /max
>>
>>
>
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:Eception in object creation
Next Topic:Showing GEF editor on a SWT composite
Goto Forum:
  


Current Time: Tue Mar 19 10:37:25 GMT 2024

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

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

Back to the top