That's amazing Yale! Can't wait to use Inkcape in a tablet in the near future to test this new gestures.
Cheers.
--Victor Westmann
2017-04-22 5:04 GMT-07:00 Tavmjong Bah <tavmjong@...8...>:
Looks nice.
I'll try to set some time aside next week to have a good look at the code and hopefully merge it.
Tav
On Sat, 2017-04-22 at 04:27 -0700, Yale Zhang wrote:
Rotate should be useful. I think most people find it easier to draw vertical lines than horizontal since there's less wrist motion.
I've updated my touchscreen code to support canvas rotation. Anyone want to use it?
transform math: https://1drv.ms/u/s!AngRQgSreBCehTiw0R_rGV7gxQIP
A couple of notes: *awkward coordinate system - Why is the canvas completely off the screen when rotation=0, offset=0? It seems the window's Y axis points down while the document's Y axis points up?
- why is a positive rotation counter clockwise? In a left handed
coordinate system, it should be clockwise.
*I couldn't figure out how to set the rotation, zoom, and offset using the functions in the desktop class (scroll_to_point(), zoom_absolute_keep_point() and had to access the private affine matrix directly. Calling those functions in sequence seems to add unwanted offsets on top of each other instead of letting me set the offset directly.
*had to roll back r15548 or else touch screen events get lost somehow.
- I couldn't figure out how to use the GTK gesture classes (which are
probably more robust), so wrote my own code for detecting zoom, rotate, and scroll gestures. When I tried, the gesture classes weren't receiving any events. 2nd, it seems only 2 finger rotation and zoom gestures are recognized, but not 2 finger scrolling. There is a 1 finger scroll gesture.
-Yale
On Tue, Apr 4, 2017 at 8:35 PM, Raghavendra Kamath <raghu@...3496...> wrote:
Hi Tav,
On 2017 Mar 30 13:29:23, Tavmjong Bah wrote:
Hi,
I've just checked in code to quickly preview canvas rotation. Like Jabier's code, it is triggered by Ctrl-Middle-Mouse-Button. It lacks all the fancy graphics of Jabier's version. Some of this can be added back if there is user demand. There is certainly some tweaking to do.
I also implemented canvas flip (Horizontal and Vertical). This is not in the GUI yet. Flipping can be bound to keys (not done by default since there are few keys free).
So here is a summary of what you can do:
- Rotate canvas
- Via GUI spin-entry box:
- Directly enter a number.
- Mouse up/down to change by ±1°.
- Click on + or − to change by ±1°.
- Left click to open pop-up.
- Via Key shortcut
- Inkscape Preferences->Interface->Keyboard Shortcuts, View
- Rotate Clockwise (Recommended: 'Shift-(')
- Rotate Counter-Clockwise (Recommended: 'Shift-)')
- Rotate 0 (Recommended: '0')
- Uses /options/rotateincrement/value for step size if set.
- Via Ctrl-Middle-Mouse-Button. Drag cursor keeping Middle-Mouse-Button down to rotate. Release mouse button to end.
- No auxilary key: ±1°.
- Shift: ±15°.
- Alt: arbitrary rotation.
- Shift + Ctrl: reset to zero.
- Flip canvas
- Via Key shortcut
- Inkscape Preferences->Interface->Keyboard Shortcuts, View
- Flip Horizontal (Recommended: 'Shift-H')
- Flip Vertical (Recommended: 'Shift-V')
- Flip None
Thank you very much for the work. The shortcut keys are great now :)
-- Raghavendra Kamath Illustrator raghukamath.com
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel