[Etoys] Drawing with the mouse.

Jerome Peace peace_the_dreamer at yahoo.com
Tue Nov 25 22:34:26 EST 2008


The gui problem 

The cursor becomes a lot more managable for drawing
 when it slowly moves the pen tip.
That is, the amount of motion to move the pen a little bit
 must be larger for drawing than for pointing. 
If you miss while pointing thats no big deal you correct and get there.
With drawing you want control as you draw
 so the pen object needs to move much slower than the cursor.

This is not too hard (for a developer) to do. 
>From a mouse move event, instead of tracking cursor position 
you track the total movement vector scaled down. 
And add that to the target (in this case the pen objects)
 current position each time.  
If the cursor and pen object get too far out of sync
 you just release the mouse. Move the cursor back over the pen
 and start dragging it again. 
The eye focuses on the moving pen.
The hands quickly learn to adjust. 
The pen object can be whatever size you like. 
It does not have to be "picked up". 
It can just be "moved along" (as when you drag the brown halo.)

Hth,

Yours in curiosity and service, --Jerome Peace





      



More information about the etoys-dev mailing list