Unlimited canvas painting program

Grant Edwards invalid at invalid.invalid
Thu Oct 24 17:51:18 EDT 2013


On 2013-10-24, Tim Chase <tim at thechases.com> wrote:
> On 2013-10-24 12:16, markotaht at gmail.com wrote:
>> How to create a program similar to paint, but the difference would
>> be that the cursor would be always in the middle and the canvas
>> moves or the camera is always fixed on the cursor as it moves
>> around the canvas. And the canvas should be infinite. What would be
>> reasonable to use? 
>
> To hold an (effectively) infinite *bitmap* canvas, you'd (effectively)
> need an (effectively) infinite amount of memory.

Sparse arrays allow it to be sort-of implemented as long as most of
the bitmap is "empty".

> However, it could be done with an (effectively) infinite *vector*
> canvas.

Sort of.  Eventually you run out of bits to hold the coordinates.

> That way you could limit the on-screen rendering to just the
> clipped subset of the vector collection.

The same can be done for a sparse array of bitmap subsets.

-- 
Grant Edwards               grant.b.edwards        Yow! I'm totally DESPONDENT
                                  at               over the LIBYAN situation
                              gmail.com            and the price of CHICKEN
                                                   ...



More information about the Python-list mailing list