Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to rotate a figure
How to rotate a figure [message #221820] Mon, 21 August 2006 09:14 Go to next message
Eclipse UserFriend
Originally posted by: geetesh.jain.gmail.com

Hi all,

I can succesful draw a figure on the editor.. and subsequent childs also
over it.
However now i have to add a feature where in i can rotate the parent
figure, and subsequent child should get rotated with it.

So please suggest a solution to how to achieve this objective.

Thanks
Gunakar Rao
Re: How to rotate a figure [message #221893 is a reply to message #221820] Mon, 21 August 2006 14:46 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is probably possible to do, but it is not supported right now.

The main issue is the way a figure is clipped to a bounding rectangle. Once
you start rotating the rectangle, there is no support in SWT for
intersecting such geometry, so the clip "region" or "path" can not be
computed easily. You could decide in your application that your figures are
well-behaved and will not paint outside of their bounds, so you don't need
to calculate the intersection. Or, you could use AWT geometry package to do
the math. But either way, you have some work to do. Most notably, once you
call rotate() on SWTGraphics, you can no longer call clip(), it will throw
an exception.

"Gunakar Rao" <geetesh.jain@gmail.com> wrote in message
news:92093fd073702afe651a7da843ee65b0$1@www.eclipse.org...
> Hi all,
>
> I can succesful draw a figure on the editor.. and subsequent childs also
> over it.
> However now i have to add a feature where in i can rotate the parent
> figure, and subsequent child should get rotated with it.
>
> So please suggest a solution to how to achieve this objective.
>
> Thanks
> Gunakar Rao
>
>
>
>
>
>
Previous Topic:Draw2D, layouts and preferred sizes
Next Topic:figure of TextCompartmentEditPart is not visible
Goto Forum:
  


Current Time: Tue Jan 14 17:25:53 GMT 2025

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

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

Back to the top