After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 100886 - Turn Rotate Rotation
Turn Rotate Rotation
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: general
0.90
Other All
: Normal enhancement
: ---
Assigned To: maciek
Dia maintainers
: 109162 353354 520137 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-12-10 22:50 UTC by Alan Horkan
Modified: 2019-03-20 11:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
alpha version patch of text rotation (see comment) (7.30 KB, patch)
2005-06-19 23:37 UTC, maciek
needs-work Details | Review

Description Alan Horkan 2002-12-10 22:50:06 UTC
Need to add links to the various stuff discussed on the mailing list but
suffice to say we all want to be able to rotate shapes.  

Firstly simple rotate 90 180 and 270 
aka Turn Left  Ctrl+L  Turn Right  Ctrl+R

And later Free Abitrary Rotation by N degrees.
Comment 2 Alan Horkan 2003-03-29 03:30:29 UTC
*** Bug 109162 has been marked as a duplicate of this bug. ***
Comment 3 Alan Horkan 2003-04-07 16:19:27 UTC
This is a short extract for references purposes.  

From Graphics Gems, edited by Andrew S Glassner.  

Fast 2D - 3D Rotation
Jack Ritter, Versate, Inc., Santa Clara California

... to rotate a point around the origin quickly and accurately ..

rotated coordinately (X',Y') derived from (X,Y) by

X' <- X*cos( \Theta ) - Y*sin ( \Theta )
Y' <- X*sin( \Theta ) - Y*cos ( \Theta )

[I have used \Theta because trying to do the greek letter is too much
effort).  

...computing sin() cos() is very costly...
makes use of a precomputed table of sine values, scaled such that
16-bit fixed point multiples can be used.  

p440

FYI 
sin 0 = 0
cos 0 = 1
sin 90 = 1
cos 90 = ~ 6.123 e-17
sin 180 = ~ 1.224 e-16
cos 180 = -1
sin 270 = -1 
cos 270 = -1.836 e-16
Comment 4 Hans Breuer 2004-01-11 22:57:54 UTC
sorry, this wont happen anytime soon, setting to enhancement to get it
out of my way while fixing 'real' bugs ;)
Comment 5 maciek 2005-06-19 23:37:43 UTC
Created attachment 48024 [details] [review]
alpha version patch of text rotation (see comment)

I start working on text rotation (with Pango).
I add rotation angle (in degrees) properties to Text component.
On screen rotated text is croped by old text box. I don't know how information
about text's size is gotten by higher displaying layer. Any help will by
appreciate :)) Exporting to eps-builtin (by: dia -e 2.eps -t eps-builtin 2.dia)
working better, entire text is displayed, but it's croped near page border.
It's also problem with text size information, because I don't touch it yet.
Any comments, help or good word will be welcome. :)))
Maciek
Comment 6 Lars Clausen 2005-11-07 04:01:58 UTC
Thank you for starting this work, it's been much wanted.  I was planning to
start with text rotation, too, as it would be doable without changing everything
and give a fair amount of benefit.

The rotation code uses PangoMatrix, which appears in Gtk 2.6.  We currently only
require 2.4, and I would like to keep it that way until there are good arguments
to upgrade -- a working version of this patch might well be one such.

I see you've added a rotate field to Object, right next to the affine field. 
It'd be more extensible if at the Object level, we used an actual affine matrix,
just limited to simple rotation for text objects right now.  Encapsulating it in
transformations to and from a simple rotation would be fine, but I would like to
see DiaObject and the renderer talking to each other in terms of affine
transformations.

For the cropping, you've forgotten to update the bounding box calculations in
textobj_update_data.  That should also fix the eps problems.

If you fix the above, I shall be happy to get it into the next release.  Sorry
for the long delay on acting on this, real life got in the way.

Oh, and could you avoid the Polish comments? :) (At least it looks Polish to me,
apologies if it isn't)
Comment 7 Lars Clausen 2006-12-02 19:49:21 UTC
*** Bug 353354 has been marked as a duplicate of this bug. ***
Comment 8 Steffen Macke 2008-03-03 17:45:18 UTC
*** Bug 520137 has been marked as a duplicate of this bug. ***
Comment 9 Steffen Macke 2010-05-30 17:14:58 UTC
There's a first version of a rotation plugin in the Git repository:

http://dia-installer.de/doc/rotation.html.en
Comment 10 GNOME Infrastructure Team 2019-03-20 11:03:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/71.