Home » Eclipse Projects » GEF » Rotate figures
Rotate figures [message #56486] |
Mon, 20 January 2003 13:32 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
How can I rotate a figure? Does the GEF provide calculation utilities for
rotating rectangles (and/ locations) around a specified center? (eg.
rotating one figure around its center and rotating more figures around a
specified center).
Thanks, Gunnar
|
|
| | | |
Re: Rotate figures [message #58339 is a reply to message #56725] |
Mon, 27 January 2003 16:12 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: hudsonr.us.i_b_m.com
Nope. I don't think that class helps.
Connection decorations support rotation, but they aren't generically
reusable. IMO, rotation is something that takes place at a layer above
Draw2d, since the figure's rectangular bounds need to be updated when
rotating a shape such as a rectangle. You probably want to represent the
actual polygon in your model, and thus rotation would be something that
happens to your model. No?
"Alex Selkov" <as@empproject.com> wrote in message
news:b0hkjt$c75$1@rogue.oti.com...
> Look at org.eclipse.draw2d.geometry.Transform. You may easely create
Figures
> with rotation.
>
> "Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
> news:b0gsng$qij$1@rogue.oti.com...
> > Hi!
> >
> > How can I rotate a figure? Does the GEF provide calculation utilities
for
> > rotating rectangles (and/ locations) around a specified center? (eg.
> > rotating one figure around its center and rotating more figures around a
> > specified center).
> >
> > Thanks, Gunnar
> >
> >
>
>
|
|
|
Re: Rotate figures [message #58506 is a reply to message #58339] |
Tue, 28 January 2003 08:09 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi Randy,
"Randy Hudson" <hudsonr@us.i_b_m.com> schrieb im Newsbeitrag
news:b13k7r$8ov$1@rogue.oti.com...
> Connection decorations support rotation, but they aren't generically
> reusable. IMO, rotation is something that takes place at a layer above
> Draw2d, since the figure's rectangular bounds need to be updated when
> rotating a shape such as a rectangle. You probably want to represent the
> actual polygon in your model, and thus rotation would be something that
> happens to your model. No?
Not really, I just want to rotate my edit part figures to have them layouted
in a better way. If I paint the figures using shapes it is very difficult to
rotate such shapes. Exampla: how to rotate an rounded rectangle? IMHO there
is no support for this in the graphics. The graphics should be able to paint
rotated things. The only way I can handle this is to convert the rectangle
into a point list, move every point with
Point#translate(Rectangle#getCenter()#getNegated(), rotate the points using
the draw2d Transform, move the points back using
Point#translate(Rectangle#getCenter() and paint a polygon using the point
list. That may be ok for rectangles but what about rounded rectangles, ovals
and arcs?
There is not really support in draw2d, isn't it?
Cu, Gunnar
|
|
| |
Re: Rotate figures, bezier, antialiasing etc. [message #58724 is a reply to message #58511] |
Tue, 28 January 2003 19:49 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Alex Selkov![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=as%40empproject.com) Messages: 73 Registered: July 2009 |
Member |
|
|
Not only, but you are right, currently all affine transformations is a pain
(or you must use your own polyline for everything).
We are doing our Graphics class with primary goal to supprot antialiasing
(see picture attached). We can also extend this class with bezier curves and
polybezier and provide more support for affine transforms.
But currently we are working on Win32 version (using GDI+ wrapper), and to
make that in a right way we need enthusiasts from the other worlds...
Regards,
as
----- Original Message -----
From: "Gunnar Wagenknecht" <g.wagenknecht@intershop.de>
Newsgroups: eclipse.tools.gef
Sent: Tuesday, January 28, 2003 11:09 AM
Subject: Re: Rotate figures
>
> "Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
> news:b0hkjt$c75$1@rogue.oti.com...
> > Look at org.eclipse.draw2d.geometry.Transform. You may easely create
> Figures
> > with rotation.
>
> Yes I can, but only polygons and polylines.
> :(
>
> Cu, Gunnar
>
>
Attachment: image002.jpg
(Size: 36.97KB, Downloaded 126 times)
|
|
|
Re: Rotate figures [message #59120 is a reply to message #58506] |
Tue, 28 January 2003 23:15 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: none.us.ibm.com
Correct, there is no support in SWT for this.
"Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
news:b15ckn$b1h$1@rogue.oti.com...
> Hi Randy,
>
> "Randy Hudson" <hudsonr@us.i_b_m.com> schrieb im Newsbeitrag
> news:b13k7r$8ov$1@rogue.oti.com...
>
> > Connection decorations support rotation, but they aren't generically
> > reusable. IMO, rotation is something that takes place at a layer above
> > Draw2d, since the figure's rectangular bounds need to be updated when
> > rotating a shape such as a rectangle. You probably want to represent
the
> > actual polygon in your model, and thus rotation would be something that
> > happens to your model. No?
>
> Not really, I just want to rotate my edit part figures to have them
layouted
> in a better way. If I paint the figures using shapes it is very difficult
to
> rotate such shapes. Exampla: how to rotate an rounded rectangle? IMHO
there
> is no support for this in the graphics. The graphics should be able to
paint
> rotated things. The only way I can handle this is to convert the rectangle
> into a point list, move every point with
> Point#translate(Rectangle#getCenter()#getNegated(), rotate the points
using
> the draw2d Transform, move the points back using
> Point#translate(Rectangle#getCenter() and paint a polygon using the point
> list. That may be ok for rectangles but what about rounded rectangles,
ovals
> and arcs?
>
> There is not really support in draw2d, isn't it?
>
> Cu, Gunnar
>
>
|
|
|
Re: Rotate figures, bezier, antialiasing etc. [message #59152 is a reply to message #58724] |
Tue, 28 January 2003 23:17 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: none.us.ibm.com
Cool, please try to get this into the SWT GC class. Some of the features
could be hints (not rotation, of course), which are ignored on other
platforms.
"Alex Selkov" <as@empproject.com> wrote in message
news:b16lle$d8j$1@rogue.oti.com...
> Not only, but you are right, currently all affine transformations is a
pain
> (or you must use your own polyline for everything).
>
> We are doing our Graphics class with primary goal to supprot antialiasing
> (see picture attached). We can also extend this class with bezier curves
and
> polybezier and provide more support for affine transforms.
>
> But currently we are working on Win32 version (using GDI+ wrapper), and to
> make that in a right way we need enthusiasts from the other worlds...
>
> Regards,
>
> as
>
> ----- Original Message -----
> From: "Gunnar Wagenknecht" <g.wagenknecht@intershop.de>
> Newsgroups: eclipse.tools.gef
> Sent: Tuesday, January 28, 2003 11:09 AM
> Subject: Re: Rotate figures
>
>
> >
> > "Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
> > news:b0hkjt$c75$1@rogue.oti.com...
> > > Look at org.eclipse.draw2d.geometry.Transform. You may easely create
> > Figures
> > > with rotation.
> >
> > Yes I can, but only polygons and polylines.
> > :(
> >
> > Cu, Gunnar
> >
> >
>
>
>
|
|
|
Re: Rotate figures, bezier, antialiasing etc. [message #59175 is a reply to message #59152] |
Wed, 29 January 2003 00:00 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Alex Selkov![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=as%40empproject.com) Messages: 73 Registered: July 2009 |
Member |
|
|
I don't think that SWT people will like that idea... They already have heavy
classes and they don't need such functionality as we are here :)
Currently we will do that as a GEF patch (substituting SWTGraphics with our
own class if gdiplus.dll was detected).
Features like setSmoothingMode indeed will behave as hint and can be easely
added.
But we also like the idea to implement things like alpha blending and
gradient fills. That is absolutely another story, because in such case we
need to have Color (new one with additional constructor), Pen, Brush etc.
But i think that all of this can be very useful in modern 2d application.
OK, we will publish preliminary as soon as we will able to show the Logic
example with antialiasing :).
"Randy Hudson" <none@us.ibm.com> wrote in message
news:b1721n$n2v$1@rogue.oti.com...
> Cool, please try to get this into the SWT GC class. Some of the features
> could be hints (not rotation, of course), which are ignored on other
> platforms.
>
>
>
> "Alex Selkov" <as@empproject.com> wrote in message
> news:b16lle$d8j$1@rogue.oti.com...
> > Not only, but you are right, currently all affine transformations is a
> pain
> > (or you must use your own polyline for everything).
> >
> > We are doing our Graphics class with primary goal to supprot
antialiasing
> > (see picture attached). We can also extend this class with bezier curves
> and
> > polybezier and provide more support for affine transforms.
> >
> > But currently we are working on Win32 version (using GDI+ wrapper), and
to
> > make that in a right way we need enthusiasts from the other worlds...
> >
> > Regards,
> >
> > as
> >
> > ----- Original Message -----
> > From: "Gunnar Wagenknecht" <g.wagenknecht@intershop.de>
> > Newsgroups: eclipse.tools.gef
> > Sent: Tuesday, January 28, 2003 11:09 AM
> > Subject: Re: Rotate figures
> >
> >
> > >
> > > "Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
> > > news:b0hkjt$c75$1@rogue.oti.com...
> > > > Look at org.eclipse.draw2d.geometry.Transform. You may easely create
> > > Figures
> > > > with rotation.
> > >
> > > Yes I can, but only polygons and polylines.
> > > :(
> > >
> > > Cu, Gunnar
> > >
> > >
> >
> >
> >
>
>
|
|
|
Re: Rotate figures, bezier, antialiasing etc. [message #59201 is a reply to message #58724] |
Wed, 29 January 2003 01:08 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Colin Sharples![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=sharples%40nz1.ibm.com) Messages: 61 Registered: July 2009 |
Member |
|
|
Alex Selkov wrote:
> Not only, but you are right, currently all affine transformations is a pain
> (or you must use your own polyline for everything).
>
> We are doing our Graphics class with primary goal to supprot antialiasing
> (see picture attached). We can also extend this class with bezier curves and
> polybezier and provide more support for affine transforms.
>
> But currently we are working on Win32 version (using GDI+ wrapper), and to
> make that in a right way we need enthusiasts from the other worlds...
Alex,
I opened bug #30329 asking for support for Bezier curves to be added to
the SWT GC class. Sounds like you have some implementation which might
help out with that - the SWT team tend to be more receptive to ideas
which are backed by code ;-)
Although these features are not strictly necessary for Eclipse itself,
they would be very useful for GEF applications built on top of Eclipse,
so I think it is reasonable to ask for SWT to support it.
Feel free to contribute to bug #30329.
--
Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
"Sometimes I think the surest sign intelligent life exists
elsewhere in the Universe is that it's never tried to contact us"
|
|
|
Re: Rotate figures, bezier, antialiasing etc. [message #59225 is a reply to message #58724] |
Wed, 29 January 2003 09:39 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
"Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
news:b16lle$d8j$1@rogue.oti.com...
> We are doing our Graphics class with primary goal to supprot antialiasing
> (see picture attached). We can also extend this class with bezier curves
and
> polybezier and provide more support for affine transforms.
Do you have plans to contribute your work to Eclipse? IMHO it must not be
implemented in SWT. It would be better to have it in Draw2D only.
> But currently we are working on Win32 version (using GDI+ wrapper), and to
> make that in a right way we need enthusiasts from the other worlds...
Sorry, I don't understand it completly. Are you looking for enthusiasts that
do the port to Motif, GTK and others or to Win32?
Cu, Gunnar
|
|
|
Re: Rotate figures, bezier, antialiasing etc. [message #59250 is a reply to message #59175] |
Wed, 29 January 2003 09:41 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
"Alex Selkov" <as@empproject.com> schrieb im Newsbeitrag
news:b174c8$o98$1@rogue.oti.com...
> Currently we will do that as a GEF patch (substituting SWTGraphics with
our
> own class if gdiplus.dll was detected).
It could be possibly integrated into Draw2D if you are willing to contribute
it.
> Features like setSmoothingMode indeed will behave as hint and can be
easely
> added.
> But we also like the idea to implement things like alpha blending and
> gradient fills. That is absolutely another story, because in such case we
> need to have Color (new one with additional constructor), Pen, Brush etc.
> But i think that all of this can be very useful in modern 2d application.
Yes, this is a topic that is not done in SWT. Java2D provides a lot of
possibilities.
> OK, we will publish preliminary as soon as we will able to show the Logic
> example with antialiasing :).
Great :)
Cu, Gunnar
|
|
| |
Re: Rotate figures, bezier, antialiasing etc. [message #159109 is a reply to message #59299] |
Mon, 22 November 2004 21:02 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Daniel Mazurek![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=DanielMazurek%40gmx.de) Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hello,
I know its been a while since the last posting, but I´m really
interested in this GEF-Patch, has it ever been released? And if where
can I find it?
I´m interested in it, because i´m currently working on Project based on
GEF 3.1 and it is nearly complete. I already have a lot of things
implemented, e.g. rulers and grid like in the logic example and
everything works fine. But because I have to be backwards-compatible
with an old file-format which supports rotation, I really need a general
mechanism for rotating figures. This is important, because I have
several basic geometric shapes (polylines, rectangles, arcs, ...) but
beyond this also rotated texts, with different fonts.
I started this project nearly 1 year ago, based on Java2D, but because
of the decision of our company to use the RCP as base for our client,
I restarted the project from scratch based on GEF, first trying to use
the Holongate J2D2SWT-Bridge, but as this Project works only with
GEF 2.x, I decided not to use it.
But now I´m at the point where I realized that GEF and Draw2D
respectivly do not support rotation of Figures, and I can´t believe that
such a powerful Graphical Framework, does not contain such a feature.
I really like the new 3.1 features e.g. the SnapToGeometry, but I do
think that rotation is a REALLY FUNDAMENTAL Feature, that should be
implemented. It would be nice if this could be done until the final
release of GEF 3.1. Further on I wonder what the
org.eclipse.draw2d.geometry.Transform Class is good for, because I
thought, that similary to Java2D (AffineTransform) I could transform any
Shape with such a Transform-Object, but as I saw this is not the case.
I wonder if someone can help me with this, or does anyone know when the
3.0 Release of the Holongate.org J2D2SWT-Bridge for 3.0 will be
available? Or have I just overseen anything?
Thank you very much in advance
Daniel
Alex Selkov wrote:
> "Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
> news:b18694$bvd$1@rogue.oti.com...
>
>
>>Do you have plans to contribute your work to Eclipse? IMHO it must not be
>>implemented in SWT. It would be better to have it in Draw2D only.
>
>
> All code will be under CPL.
>
>
>>Sorry, I don't understand it completly. Are you looking for enthusiasts
>
> that
>
>>do the port to Motif, GTK and others or to Win32?
>
>
> Yes, it's better to have someone who knows GTK/Motif/Carbon and who can help
> us with advices.
>
>
|
|
|
Goto Forum:
Current Time: Fri Aug 23 12:26:32 GMT 2024
Powered by FUDForum. Page generated in 0.06947 seconds
|