On Tue, 2017-03-21 at 09:16 +0530, Raghavendra kamath wrote:
On Tue, Mar 21, 2017 at 2:49 AM, Tavmjong Bah <tavmjong@...8...> wrote:

Hi,

I've been reworking Jabier's window rotation code to use the desktop to
window affine rather than messing with the SVG viewbox. This is to keep
the GUI code out of the SVG handling code (also viewbox doesn't have
the concept of rotation so it was a real hack to put it in there). This
also unifies how zoom and rotation are handled (and eventually could
include flip).

Thank you very much for the work Tav and Jabier,
 
With trunk r15603 most of the work is done so I would like to ask that
people try it out.

There are currently two ways to rotate the canvas.

1. Use the rotate spin entry box at the lower right corner of the
screen to input an arbitrary rotation value (right click to open a pop-
up with preset values). In this case, the rotation is around the center
of the window.

2. Use Shift-Ctrl-Scroll wheel to rotate around the current cursor
position. Currently the rotation is set to be in increments of 2
degrees. (We can make this a user defined preference.)

I believe this shortcut is a bit cumbersome for people using graphic tablet (e.g. wacom).
Due to scroll wheel, I know there are some scroll buttons in tablets but they are not on the pen and pressing Ctrl + shift and then the scroll buttons on tablet is going to be cumbersome.
Can it be Shift (or Ctrl) + middle click & drag, or ctrl + shift + left click & drag, or anything that can be easily triggered with pen and keyboard too without the need to keep the pen down for rotating.


I've added three verbs for canvas rotation (SP_VERB_ROTATE_CW, SP_VERB_ROTATE_CCW, SP_VERB_ROTATE_ZERO). These can be assigned to keys in the preferences dialog. I would assign them by default to '(',  ')', '0' but these are already taken by inset/outset. (Imagine an arrow on the top end of the parentheses.)

There can also be some single key keyboard shortcuts in addition to these, which will rotate the canvas in certain degrees (e.g. 15°).
They can be numpad numbers like 4 - rotate left , 6 rotate -right and 5 for resetting rotation.

Rotation will now use the value of '/options/rotateincrement/value' in the preferences.xml file (matching '/options/zoomincrement/value' for zoom) to determine the rotation step.

I also had one doubt, Will there be a 'Rotate' sub-menu in the 'View' menu, like there is one for 'Zoom'. The menu may have some common rotate options such as rotate canvas view to 90° clockwise, anti-clockwise , reset rotation etc.

That could be added.

BTW, does anybody use the Zoom Tool? I think that would be a good candidate for removal. (There is the Zoom menu, keyboard shortcuts, and the Zoom spin box.)

Tav