Unlimited canvas painting program

Albert van der Horst albert at spenarnc.xs4all.nl
Thu Nov 7 12:30:40 CET 2013


In article <mailman.1477.1382644948.18130.python-list at python.org>,
MRAB  <python-list at python.org> wrote:
>On 24/10/2013 20:32, markotaht at gmail.com wrote:
>> So, i`ll take the canvas, somekind of mouse tracker, for each mouse
>> location il draw a dot or 2X2 square or something. Main thing i have
>> never understood, is how can i get the backround to move.
>>
>> Lets say ia hve 200X200 window. In the middle of it is the cursor
>> that draws. If i move the mouse the cursor doesent move, but the
>> canvas moves. So if i move mouse to the left, i get a line that goes
>> to the left. So i probably must invert the canvas movement. If mouse
>> goes left, canvas goes right.
>>
>> And if possible i would like to save my piece of art aswell :D
>>
>I think it'll be confusing because it goes against how every other
>program does it!
>
>In a painting program you can point to other things, such as tools, but
>if the cursor never moves...
>
>It would be simpler, IMHO, if you just moved the canvas and stopped the
>cursor going off the canvas when the user is drawing near the edge, so
>that the user doesn't need to stop drawing in order to expose more of
>the canvas.

A trick that is used in the editor I'm currently using is to do
normal cursor movement, until you are within a certain range from
the border. At that point you move the window over the canvas
in order to keep the cursor in the middle part of the canvas.
This can be done in discrete steps, and is not too disruptive.
Even if you do it continuously, it is more intuitive (but functionally
equivalent to) keeping the cursor in the middle.

A problem that remains is that a mouse is not intended for an infinite
canvas. At some point you will have to lift it and place it back on the
pad.

Groetjes Albert
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst




More information about the Python-list mailing list