Update to window rotation.

classic Classic list List threaded Threaded
39 messages Options
12
C R
Reply | Threaded
Open this post in threaded view
|

Re: Update to window rotation.

C R
I've owned various low end wacom tablets, including the bamboo series, and presently this one: http://www.wacom.com/en-gb/products/pen-tablets/intuos

They all work the same under Ubuntu.

-C

On 21 Mar 2017 20:20, "Vladimir Savic" <[hidden email]> wrote:
Everything helps! Do you use Cintiq or Intuos Touch? We need to do this right. ;-) Unfortunately, I don't have access to my computer right now. Tomorrow is a new day...


On Tue, Mar 21, 2017, 20:16 C R <[hidden email]> wrote:

My external wacom tablets work the same way, too, if it helps. :)

On Mar 21, 2017 6:28 PM, "C R" <[hidden email]> wrote:

I pan with space plus single touch drag, but I could pan with two fingers up/down and left/right. This works too. Object away, I'm all ears! :D
-C

On Mar 21, 2017 6:15 PM, "Vladimir Savic" <[hidden email]> wrote:
Hi C,

Can you tell me how do you pan the canvas using multitouch gestures on Lenovo X220T? I have some objections to your proposal, but first I would like to know more about other multitouch devices. It might be that I am missing something obvious. 

Vlada

On Tue, Mar 21, 2017, 16:35 C R <[hidden email]> wrote:
Just tried, and works well!

Someone mentioned changing to a more tablet-friendly hotkey combo,
however it might be noted that most of the tablets currently on the
market support multitouch, and therefore support two-finger dragging
as a scrollwheel action by default. I have confirmed this on my Lenovo
X220T, and I think it works reasonably well as-is... much better than
using the third mouse button, which may or may not be present at all,
or cluttering the ctrl+alt key combinations with what's essentially a
nice-to-have feature that's not mission critical in most
circumstances.



That said, when Inkscape gets more brushes, and Ubuntu supports
mutli-touch rotation actions, this should be a great drawing feature
that will definitely allow users to "Draw Freely". ;)

One minor problem is that when using the mouse wheel for rotation, it
skips over 45 degrees. I recommend the default increment to 15 degree
angles rather than 2 degree increments for the following reasons:
1. It corresponds to the default snap-to angles of holding the alt key
while drawing lines etc, so the problem mentioned earlier about the
tools "not rotating" with the canvas is masked (will still work as
expected/wanted by the user at 15 degree angles)
2. Covers all the most useful angles for constructing things.
3. Keeps the user from having to flick the mouse wheel more than a few
times to get the desired angle.
5. Can be overridden easily in a variety of ways for the edge cases
that need a slight rotation.

Great work Tav!

Would you like me to do a video for the feature that you can post?
I'd be glad to help. :)

-C



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Update to window rotation.

Tavmjong Bah
In reply to this post by C R
On Tue, 2017-03-21 at 15:35 +0000, C R wrote:
> Just tried, and works well!

Excellent!

...

> One minor problem is that when using the mouse wheel for rotation, it
> skips over 45 degrees. I recommend the default increment to 15 degree
> angles rather than 2 degree increments for the following reasons:
> 1. It corresponds to the default snap-to angles of holding the alt
> key
> while drawing lines etc, so the problem mentioned earlier about the
> tools "not rotating" with the canvas is masked (will still work as
> expected/wanted by the user at 15 degree angles)
> 2. Covers all the most useful angles for constructing things.
> 3. Keeps the user from having to flick the mouse wheel more than a
> few
> times to get the desired angle.
> 5. Can be overridden easily in a variety of ways for the edge cases
> that need a slight rotation.

Just set the default value to 15 degrees and added a preference for
step size in the Inkscape Preferences dialog (Behavior->Steps).

(Step size for +/- buttons in spin widget is still 1 degree with left
mouse button but 15 degrees with middle mouse button.)

> Great work Tav!

Thanks... and thank Jabier too who got this all started.

> Would you like me to do a video for the feature that you can post?
> I'd be glad to help. :)

Sure!

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Update to window rotation.

Jabier Arraiza
In reply to this post by C R
Hi here is the branch with the UI reviewed for fast rotate view I tell
in the morning. Is only to have the code available and as a preview, no
intends to use this code.
https://code.launchpad.net/~inkscape.dev/inkscape/legacyRotateShowcase

And here is a pic working with the new interface. No video ;)
https://inkscape.org/en/~jabiertxof/%E2%98%85legazy-rotate-new-ui

Cheers, Jabier.




On Tue, 2017-03-21 at 20:49 +0000, C R wrote:

> I've owned various low end wacom tablets, including the bamboo
> series, and presently this one: http://www.wacom.com/en-gb/products/p
> en-tablets/intuos
>
> They all work the same under Ubuntu.
>
> -C
>
> On 21 Mar 2017 20:20, "Vladimir Savic" <vladimir.firefly.savic@gmail.
> com> wrote:
> > Everything helps! Do you use Cintiq or Intuos Touch? We need to do
> > this right. ;-) Unfortunately, I don't have access to my computer
> > right now. Tomorrow is a new day...
> >
> >
> > On Tue, Mar 21, 2017, 20:16 C R <[hidden email]> wrote:
> > > My external wacom tablets work the same way, too, if it helps. :)
> > > On Mar 21, 2017 6:28 PM, "C R" <[hidden email]> wrote:
> > > > I pan with space plus single touch drag, but I could pan with
> > > > two fingers up/down and left/right. This works too. Object
> > > > away, I'm all ears! :D
> > > > -C
> > > > On Mar 21, 2017 6:15 PM, "Vladimir Savic" <vladimir.firefly.sav
> > > > [hidden email]> wrote:
> > > > > Hi C,
> > > > >
> > > > > Can you tell me how do you pan the canvas using multitouch
> > > > > gestures on Lenovo X220T? I have some objections to your
> > > > > proposal, but first I would like to know more about other
> > > > > multitouch devices. It might be that I am missing something
> > > > > obvious. 
> > > > >
> > > > > Vlada
> > > > >
> > > > > On Tue, Mar 21, 2017, 16:35 C R <[hidden email]> wrote:
> > > > > > Just tried, and works well!
> > > > > >
> > > > > > Someone mentioned changing to a more tablet-friendly hotkey
> > > > > > combo,
> > > > > > however it might be noted that most of the tablets
> > > > > > currently on the
> > > > > > market support multitouch, and therefore support two-finger
> > > > > > dragging
> > > > > > as a scrollwheel action by default. I have confirmed this
> > > > > > on my Lenovo
> > > > > > X220T, and I think it works reasonably well as-is... much
> > > > > > better than
> > > > > > using the third mouse button, which may or may not be
> > > > > > present at all,
> > > > > > or cluttering the ctrl+alt key combinations with what's
> > > > > > essentially a
> > > > > > nice-to-have feature that's not mission critical in most
> > > > > > circumstances.
> > > > > >
> > > > > >
> > > > > >
> > > > > > That said, when Inkscape gets more brushes, and Ubuntu
> > > > > > supports
> > > > > > mutli-touch rotation actions, this should be a great
> > > > > > drawing feature
> > > > > > that will definitely allow users to "Draw Freely". ;)
> > > > > >
> > > > > > One minor problem is that when using the mouse wheel for
> > > > > > rotation, it
> > > > > > skips over 45 degrees. I recommend the default increment to
> > > > > > 15 degree
> > > > > > angles rather than 2 degree increments for the following
> > > > > > reasons:
> > > > > > 1. It corresponds to the default snap-to angles of holding
> > > > > > the alt key
> > > > > > while drawing lines etc, so the problem mentioned earlier
> > > > > > about the
> > > > > > tools "not rotating" with the canvas is masked (will still
> > > > > > work as
> > > > > > expected/wanted by the user at 15 degree angles)
> > > > > > 2. Covers all the most useful angles for constructing
> > > > > > things.
> > > > > > 3. Keeps the user from having to flick the mouse wheel more
> > > > > > than a few
> > > > > > times to get the desired angle.
> > > > > > 5. Can be overridden easily in a variety of ways for the
> > > > > > edge cases
> > > > > > that need a slight rotation.
> > > > > >
> > > > > > Great work Tav!
> > > > > >
> > > > > > Would you like me to do a video for the feature that you
> > > > > > can post?
> > > > > > I'd be glad to help. :)
> > > > > >
> > > > > > -C
> > > > > >
> > > > > >
>
> -------------------------------------------------------------------
> -----------
> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Update to window rotation.

Martin Owens-2
In reply to this post by Jean-Francois Lemaire
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

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Canvas rotation and flip update.

Tavmjong Bah

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Jabier Arraiza
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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Raghavendra kamath
In reply to this post by Tavmjong Bah
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Yale Zhang
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
<[hidden email]> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

touchscreen.diff (44K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Yale Zhang
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 <[hidden email]> 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
> <[hidden email]> 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
>> [hidden email]
>> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Tavmjong Bah
In reply to this post by Yale Zhang

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
> <[hidden email]> 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
> > [hidden email]
> > 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Victor Westmann
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 <[hidden email]>:

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
> <[hidden email]> 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
> > [hidden email]
> > 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Yale Zhang
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
<[hidden email]> 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 <[hidden email]>:
>>
>>
>> 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
>> > <[hidden email]> 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
>> > > [hidden email]
>> > > 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
>> > [hidden email]
>> > 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
>> [hidden email]
>> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Martin Owens-2
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,

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Miguel Lopez
In reply to this post by Yale Zhang

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
[hidden email] 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 [hidden email]:

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
[hidden email] 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Boudewijn Rempt
In reply to this post by Yale Zhang
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/

:-)

--
Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Miguel Lopez
In reply to this post by Miguel Lopez

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
[hidden email] 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 [hidden email]:
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
[hidden email] 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Canvas rotation and flip update.

Yale Zhang
"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 <[hidden email]> 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+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
[hidden email] 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 [hidden email]:
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
[hidden email] 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Touch

Tavmjong Bah
In reply to this post by Yale Zhang


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?
>
> 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?

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


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Touch

Yale Zhang
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 <[hidden email]> wrote:

>
>
> 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?
>>
>> 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?
>
> 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
>

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
12