Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Non-rectangular clipping
Non-rectangular clipping [message #190916] Sat, 06 August 2005 23:10 Go to next message
Eclipse UserFriend
Originally posted by: venkataraman.m.tcs.com

It is just out of curiosity. Why non-rectangular clipping is not supported
by Draw2D's Graphics class when SWT's GC has it with
GC::setClipping(Region rg) ?
Is it just too advanced for GEF user or any other reason ?

~Venkat
Re: Non-rectangular clipping [message #190940 is a reply to message #190916] Sun, 07 August 2005 16:35 Go to previous messageGo to next message
Josh Reed is currently offline Josh ReedFriend
Messages: 38
Registered: July 2009
Member
See Graphics.setClip(Path path) in the 3.1 release. This allows you to
set a non-rectangular clip. It seems to work for me.

Josh

venkat wrote:
> It is just out of curiosity. Why non-rectangular clipping is not
> supported by Draw2D's Graphics class when SWT's GC has it with
> GC::setClipping(Region rg) ?
> Is it just too advanced for GEF user or any other reason ?
>
> ~Venkat
>
Re: Non-rectangular clipping [message #190958 is a reply to message #190940] Sun, 07 August 2005 19:36 Go to previous messageGo to next message
Josh Reed is currently offline Josh ReedFriend
Messages: 38
Registered: July 2009
Member
On testing Graphics.setClip(Path path) today across different platforms,
I did find some inconsistent behavior with the Graphics.drawImage and
Graphics.drawPoint methods. Watch my thread posted a few minutes ago to
see if it affects you.

Thanks,
Josh

Josh Reed wrote:
> See Graphics.setClip(Path path) in the 3.1 release. This allows you to
> set a non-rectangular clip. It seems to work for me.
>
> Josh
>
> venkat wrote:
>
>> It is just out of curiosity. Why non-rectangular clipping is not
>> supported by Draw2D's Graphics class when SWT's GC has it with
>> GC::setClipping(Region rg) ?
>> Is it just too advanced for GEF user or any other reason ?
>>
>> ~Venkat
>>
Re: Non-rectangular clipping [message #191100 is a reply to message #190916] Mon, 08 August 2005 19:42 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The reason is that we decided to support things like push, pop, translate,
scale, etc, which seem to conflict with allowing Region to work.

For example, if you call Graphics.translate(10,0), then call
setClipping(Region), how are we supposed to translate the region? We might
be able to fix this in the future by using SWT's new Transform class, but
the solution is pretty ugly.

"venkat" <venkataraman.m@tcs.com> wrote in message
news:585f32c4e09062aeb6fee2aed9d150a4$1@www.eclipse.org...
> It is just out of curiosity. Why non-rectangular clipping is not supported
> by Draw2D's Graphics class when SWT's GC has it with
> GC::setClipping(Region rg) ?
> Is it just too advanced for GEF user or any other reason ?
>
> ~Venkat
>
Previous Topic:BUG: Graphics.drawImage and Graphics.drawPoint w/ Graphics.setClip(Path path)
Next Topic:self-referencing connections
Goto Forum:
  


Current Time: Fri Dec 13 02:57:16 GMT 2024

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

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

Back to the top