I too use an Intuos tablet but I disabled the touch feature because I hate it. I hope modest stylus users like myself won't be forgotten.
Cheers, JFL
On Tue, 2017-03-21 at 21:37 +0100, Jean-François Lemaire wrote:
I too use an Intuos tablet but I disabled the touch feature because I hate it. I hope modest stylus users like myself won't be forgotten.
I'm an Intuos3 user myself, I'd be digging in the code if I was adversely effected so don't worry. We've got a fairly wide use of hardware among the developers.
But considering what we have here. It might be useful to see if that damn touch strip thing is good for anything. Rotation could be useful but I suspect it'd have to be mapped in the buttons.
Best Regards, Martin Owens
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
Tav
Great work!
On Thu, 2017-03-30 at 13:29 +0200, 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
Tav
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
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 :)
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
A few more notes:
*GTK3 for Windows doesn't support touch events yet. I have a patch and submitted it: https://bugzilla.gnome.org/show_bug.cgi?id=776568
*On GNU/Linux, I had to turn off the Wacom driver's internal gesture recognition or else no touch events will be sent to the app. xsetwacom --set "device" Gesture Off
On Sat, Apr 22, 2017 at 4:27 AM, Yale Zhang <yzhang1985@...400...> 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
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
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
Well, I built on what Jabier and Tav did, so hats off to them too.
I just realized even Krita doesn't have canvas rotation (Autodesk Sketchpad is the only other program I know). Good to be ahead of Krita for once (and all the fancy Qt, VC SIMD libraries they use)!
On Sat, Apr 22, 2017 at 12:16 PM, Victor Westmann <victor.westmann@...400...> wrote:
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
On Sat, 2017-04-22 at 20:00 -0700, Yale Zhang wrote:
Well, I built on what Jabier and Tav did, so hats off to them too.
Hats off to everyone :-) no code is an island so keep reviewing each other's code and building on it.
I'm excited by this feature even though it's not one I think I'll use.
Martin,
Uh, they do have canvas rotation at 15 degrees last time I checked. Just pointing that out.
"There's a couple of possibilities here: either 4 and 6, or ctrl+[ and ctrl+] for basic 15 degrees rotation left and right. But you can also have more sophisticated rotation with Shift+Space+drag or shift+[middle mouse button]+drag. To reset the rotation, press 5." - Introduction to Krita Coming from Sai at docs.krita.org
Plus, Krita can be horrifying to work with at times. More instable than Inkscape Development Builds at times.
Oh, and a question. If I were to rotate and flip, can I save using that coordinate and then freeze transformation akin to maya? Let me explain a little further.
In Maya, you can edit the rotation, scale, and position of a object. If you freeze the transformation, the scale, rotation, and position becomes 0 without affecting the actual coordinate of the vertex of a object.
So, in Inkscape, this is like flipping/rotating the entire scene, but resetting it back to 0 with the flipped/rotated result. I don't think this is neccessary unless one wants to do something like mirror scene. Maybe it can come in handy for some people.
On 4/22/2017 11:00 PM, Yale Zhang wrote:
Well, I built on what Jabier and Tav did, so hats off to them too.
I just realized even Krita doesn't have canvas rotation (Autodesk Sketchpad is the only other program I know). Good to be ahead of Krita for once (and all the fancy Qt, VC SIMD libraries they use)!
On Sat, Apr 22, 2017 at 12:16 PM, Victor Westmann <victor.westmann@...400...>mailto:victor.westmann@...400... wrote:
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...>mailto: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...>mailto: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.netmailto: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.netmailto: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.netmailto: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.netmailto:Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Actually, I think I just had another idea, and yes it means scrapping the rotating canvas function. What about implementing rotate/flip entire vector objects (including the info within the objects and layers) within arbitrary numbers and orthographic numbers and being able to record the number? It'd be almost like rotating/flipping entire canvas. Also, when I was testing squares when the canvas is rotated, the square is still aligned to the viewbox lines. The guideline also are aligned to the viewbox. Neither of those is suppose to happen. Rotate/flipping entire vector objects including information doesn't really affect the the creation of squares or guidelines relative to your own viewpoint.
On 4/22/2017 11:30 PM, Miguel Lopez wrote:
Uh, they do have canvas rotation at 15 degrees last time I checked. Just pointing that out.
"There's a couple of possibilities here: either 4 and 6, or ctrl+[ and ctrl+] for basic 15 degrees rotation left and right. But you can also have more sophisticated rotation with Shift+Space+drag or shift+[middle mouse button]+drag. To reset the rotation, press 5." - Introduction to Krita Coming from Sai at docs.krita.org
Plus, Krita can be horrifying to work with at times. More instable than Inkscape Development Builds at times.
Oh, and a question. If I were to rotate and flip, can I save using that coordinate and then freeze transformation akin to maya? Let me explain a little further.
In Maya, you can edit the rotation, scale, and position of a object. If you freeze the transformation, the scale, rotation, and position becomes 0 without affecting the actual coordinate of the vertex of a object.
So, in Inkscape, this is like flipping/rotating the entire scene, but resetting it back to 0 with the flipped/rotated result. I don't think this is neccessary unless one wants to do something like mirror scene. Maybe it can come in handy for some people.
On 4/22/2017 11:00 PM, Yale Zhang wrote:
Well, I built on what Jabier and Tav did, so hats off to them too.
I just realized even Krita doesn't have canvas rotation (Autodesk Sketchpad is the only other program I know). Good to be ahead of Krita for once (and all the fancy Qt, VC SIMD libraries they use)!
On Sat, Apr 22, 2017 at 12:16 PM, Victor Westmann <victor.westmann@...400...>mailto:victor.westmann@...400... wrote:
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...>mailto: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_rGV7gxQIPhttps://1drv.ms/u/s%21AngRQgSreBCehTiw0R_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...>mailto: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.netmailto: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.netmailto: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.netmailto: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.netmailto: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.netmailto:Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
"Lukas started working on canvas rotation for Krita in 2009"
Sorry, so Krita has had canvas rotation for a long time. I didn't think it had it because in the latest version, I couldn't use touch to rotate the canvas, only scale and scroll. I also tried some mouse combos (e.g. middle button + drag like in Blender) and checked the menus but didn't see any canvas rotation (only a lossy image rotate).
Boudewijn, excuse my jealousy of Krita. I'm just saying it takes a lot of tolerance for pain and allegiance to the FSF to stick with GTK :)
"The guideline also are aligned to the viewbox." I noticed that too and it doesn't make sense.
On Sun, Apr 23, 2017 at 9:46 AM, Miguel Lopez <reptillia39@...3425...> wrote:
Actually, I think I just had another idea, and yes it means scrapping the rotating canvas function. What about implementing rotate/flip entire vector objects (including the info within the objects and layers) within arbitrary numbers and orthographic numbers and being able to record the number? It'd be almost like rotating/flipping entire canvas. Also, when I was testing squares when the canvas is rotated, the square is still aligned to the viewbox lines. The guideline also are aligned to the viewbox. Neither of those is suppose to happen. Rotate/flipping entire vector objects including information doesn't really affect the the creation of squares or guidelines relative to your own viewpoint.
On 4/22/2017 11:30 PM, Miguel Lopez wrote:
Uh, they do have canvas rotation at 15 degrees last time I checked. Just pointing that out.
"There's a couple of possibilities here: either 4 and 6, or ctrl+[ and ctrl+] for basic 15 degrees rotation left and right. But you can also have more sophisticated rotation with Shift+Space+drag or shift+[image: middle mouse button]+drag. To reset the rotation, press 5." - Introduction to Krita Coming from Sai at docs.krita.org
Plus, Krita can be horrifying to work with at times. More instable than Inkscape Development Builds at times.
Oh, and a question. If I were to rotate and flip, can I save using that coordinate and then freeze transformation akin to maya? Let me explain a little further.
In Maya, you can edit the rotation, scale, and position of a object. If you freeze the transformation, the scale, rotation, and position becomes 0 without affecting the actual coordinate of the vertex of a object.
So, in Inkscape, this is like flipping/rotating the entire scene, but resetting it back to 0 with the flipped/rotated result. I don't think this is neccessary unless one wants to do something like mirror scene. Maybe it can come in handy for some people. On 4/22/2017 11:00 PM, Yale Zhang wrote:
Well, I built on what Jabier and Tav did, so hats off to them too.
I just realized even Krita doesn't have canvas rotation (Autodesk Sketchpad is the only other program I know). Good to be ahead of Krita for once (and all the fancy Qt, VC SIMD libraries they use)!
On Sat, Apr 22, 2017 at 12:16 PM, Victor Westmann<victor.westmann@...972.....> <victor.westmann@...400...> wrote:
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...> <tavmjong@...2205.....>:
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? https://youtu.be/-8v1EVKqcaM
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...> <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 Illustratorraghukamath.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 listInkscape-devel@...1901...://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 listInkscape-devel@...1901...://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 listInkscape-devel@...1901...://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 listInkscape-devel@...1901...://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 listInkscape-devel@...1901...://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
On Sat, 22 Apr 2017, Yale Zhang wrote:
I just realized even Krita doesn't have canvas rotation (Autodesk Sketchpad is the only other program I know). Good to be ahead of Krita for once (and all the fancy Qt, VC SIMD libraries they use)!
Lukas started working on canvas rotation for Krita in 2009:
http://lukast.mediablog.sk/log/?p=73
And it was released in 2010:
http://blog.cberger.net/2010/12/11/krita-2-3-new-feature-5-canvas-rotation/
:-)
Hi,
I've had a look at the code and have come comments.
General comments:
1. Coding style should conform to:
https://inkscape.org/en/develop/coding-style/
2. Loads of compiler errors of the type:
src/display.sp-canvas.cpp:1556:43: error: invalid conversion from 'gpointer {aka void*}' to 'GdkWindow* {aka _GdkWindow*}; [-fpermissive]
These are mostly in copying event data to bevent. Why is bevent necessary? Can't the function just return 'FALSE' to get gtk_widget_real_touch_event() to do the translation?
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?
Inkscape uses an inverted coordinate system as compared to SVG. This is a long standing "bug" which we hope to fix some day but it is so embedded inside Inkscape so that fixing every occurrence is a nightmare.
- why is a positive rotation counter clockwise? In a left handed
coordinate system, it should be clockwise.
It depends on where the rotation is taking place. Desktop uses right- handed, SVG uses left-handed. See above.
*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.
I can help with this. One shouldn't need to access the private affine matrix. You probably want:
SPDesktop::rotate_relative_keep_point (Geom::Point const &c, double rotate);
and
SPDesktop::zoom_relative_keep_point (Geom::Point const &c, double zoom);
where 'c' is the point halfway between the two touch points in desktop coordinates:
Geom::Point const event_w(ave.x, ave.y); Geom::Point const event_dt(desktop->w2d(event_w));
c = event_dt;
Note also that rotation and scaling are handled independently of offset.
*had to roll back r15548 or else touch screen events get lost somehow.
This should be investigated as using gtk_device_grab (which you have reverted to) is deprecated.
- 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.
How important is it to be able to scroll using two fingers? I imagine it would be useful to be able to rotate and scroll at the same time. One finger scroll might work by ignoring the second finger.... (one would need to experiment with a gesture group containing zooming, rotating, and scrolling).
Tav
-Yale
Thanks for the review Tav. It's been a busy few weeks, but I'm back.
2. Yes, I tried since the beginning to have SPCanvas::handle_touch() return false so that gtk_widget_real_touch_event() is used to generate the mouse emulation events. gtk_widget_real_touch_event() indeed gets called and generates an event, but for some reason, that event doesn't get received by Inkscape. I'll have to dig further. ----------------------------------------------------------------------------------------------------------------------- [use SPDesktop::rotate_relative_keep_point (Geom::Point const &c, double rotate);]
I tried using those functions, but couldn't avoid reading/writing the offset of the transform matrix directly.
Here's the only version that I got to work.
#if 0 desktop->_current_affine.setRotate(finalRotation); desktop->_current_affine.setScale(scale0 * scale); desktop->_current_affine.setOffset(-offset); #else Geom::Point const rotationCenter_dt(desktop->w2d(rotationCenter - desktop->_current_affine.getOffset())); // have to subtract offset because w2d matrix doesn't have it !
desktop->zoom_absolute_keep_point(rotationCenter_dt, scale0 * scale); desktop->rotate_absolute_keep_point(rotationCenter_dt, finalRotation); desktop->scroll_absolute(-offset); #endif
offset is highly coupled with the rotation and scaling. I thought there might be a way to describe the transform without that complicated expression for offset. I tried a few permutations of zoom_absolute_keep_point(), rotate_absolute_keep_point(), and scroll_absolute() but couldn't figure it out.
Is there any objection to adding a function in Desktop to set the rotation, scaling, and offset together?
-------------------------------------------------------------------------------------------------------------- "*had to roll back r15548 or else touch screen events get lost"
I've found this was a problem with gdk_seat_grab(), which doesn't listen for touch events. I've filed a report and possible solution:
https://bugzilla.gnome.org/show_bug.cgi?id=781757
This isn't a complete stopper. It only causes touch events to be dropped when using certain tools like selection. Using touch when holding other tools like tweak, there's no difference between gtk_device_grab() and gdk_seat_grab().
---------------------------------------------------------------------------------------------------------------- "How important is it to be able to scroll using two fingers?"
Probably not critical. If you use 1 finger to scroll, then you can no longer use your finger to drive the tools (I don't see any way to tell those actions apart). Giving that up might be OK, because I never pan with my fingers - only pan/zoom/rotate and dragging selections.
On Mon, Apr 24, 2017 at 5:39 AM, Tavmjong Bah <tavmjong@...8...> wrote:
Hi,
I've had a look at the code and have come comments.
General comments:
Coding style should conform to:
Loads of compiler errors of the type:
src/display.sp-canvas.cpp:1556:43: error: invalid conversion from
'gpointer {aka void*}' to 'GdkWindow* {aka _GdkWindow*}; [-fpermissive]
These are mostly in copying event data to bevent. Why is bevent
necessary? Can't the function just return 'FALSE' to get gtk_widget_real_touch_event() to do the translation?
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?
Inkscape uses an inverted coordinate system as compared to SVG. This is a long standing "bug" which we hope to fix some day but it is so embedded inside Inkscape so that fixing every occurrence is a nightmare.
- why is a positive rotation counter clockwise? In a left handed
coordinate system, it should be clockwise.
It depends on where the rotation is taking place. Desktop uses right- handed, SVG uses left-handed. See above.
*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.
I can help with this. One shouldn't need to access the private affine matrix. You probably want:
SPDesktop::rotate_relative_keep_point (Geom::Point const &c, double rotate);
and
SPDesktop::zoom_relative_keep_point (Geom::Point const &c, double zoom);
where 'c' is the point halfway between the two touch points in desktop coordinates:
Geom::Point const event_w(ave.x, ave.y); Geom::Point const event_dt(desktop->w2d(event_w));
c = event_dt;
Note also that rotation and scaling are handled independently of offset.
*had to roll back r15548 or else touch screen events get lost somehow.
This should be investigated as using gtk_device_grab (which you have reverted to) is deprecated.
- 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.
How important is it to be able to scroll using two fingers? I imagine it would be useful to be able to rotate and scroll at the same time. One finger scroll might work by ignoring the second finger.... (one would need to experiment with a gesture group containing zooming, rotating, and scrolling).
Tav
-Yale
participants (9)
-
Boudewijn Rempt
-
Jabier Arraiza
-
Jean-François Lemaire
-
Martin Owens
-
Miguel Lopez
-
Raghavendra Kamath
-
Tavmjong Bah
-
Victor Westmann
-
Yale Zhang