Proposal: Canvas Interaction Enhancements

Dmitry Kazakov dimula73 at
Thu May 24 18:59:23 UTC 2012


I was thinking about this problem last yeat as well. And there are a couple
of ideas that might be interesting to you:

1) About all these "modes" of the tools like "Color Picking" and
"Shift+Drag". You need to be quite careful with them, because there are
various sequences of pressing a modifier and mouse button. For all the good
applications it is common that the mode is exited only when *the last*
component of the modifier+key is released.

For example (in e.g. Gimp):
i) Press Ctrl+Left Button and start moving the mouse
ii) Release Ctrl. You are still in the color picking mode. And the mouse
cursor is still persist.
III) Now you and press *any* modifiers as many times as you wish but you
will not leave color picking mode unless you release the mouse.

Such behavior can be described with a state machine easily. Probably, it
can be implemented in a way like that.

2) A good way to describe modes of the tools is using of
KoInteractionTool+KoInteractionStrategy. We have it but it is not commonly
used yet. It is at least used in DefaultTool and KoZoomTool.

3) We still need to handle Ko-wide tools as well.

4) Last year I proposed a design of a system like that, but I never
implemented it. It should have had a central class as well as you proposed

Here is a short description of it.

You can use it as a base for your system ;)

Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kimageshop mailing list