GNOME Bugzilla – Bug 100886
Turn Rotate Rotation
Last modified: 2019-03-20 11:03:51 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.
http://mail.gnome.org/archives/dia-list/2002-December/msg00079.html
*** Bug 109162 has been marked as a duplicate of this bug. ***
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
sorry, this wont happen anytime soon, setting to enhancement to get it out of my way while fixing 'real' bugs ;)
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
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)
*** Bug 353354 has been marked as a duplicate of this bug. ***
*** Bug 520137 has been marked as a duplicate of this bug. ***
There's a first version of a rotation plugin in the Git repository: http://dia-installer.de/doc/rotation.html.en
-- 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.