|Re: Rotate GraphicsAlgorithm [message #1385394 is a reply to message #1270793]
||Fri, 06 June 2014 06:55
| John Cole
Registered: June 2013
I want to refer on that topic again, as I haven't found a solution yet.|
I have defined some quite extensive shapes as following:
There is a container shape placed somewhere on the graphical editor (not he origin of course), which contains other shapes (rectangles, lines, polygons, etc.). All these basic shapes in the container form a complex overall shape.
In some cases I want to rotate that compound shape by an defined angle. Of course it would be the best solution to just rotate the container and the content would be rotated automatically (that would be the case if the container rectangle would define its own coordinate system) but unfortunately it is not possible. I also tried to translate each of the shapes to the origin, rotate it by using coordinate transformation
and then translate it back to the original position. But as the shapes are really complex, I am not able to represent them properly.
I also thought about using Graphics2D - as it supports AffineTransform - by converting the Graphiti shapes into Graphics2D shapes, rotate them and then transform them back to Graphiti shapes. But in my oppinion this is not a really good solution, as Graphics2D and Graphiti are quite different.
What in your opinion would be the best solution to realise that?
P.S. It would be sufficient to just rotate the elements by 90°, 180° and 270° for now.
[Updated on: Fri, 06 June 2014 06:57]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.04097 seconds