Autolayers & datamanager

Casper Boemann cbr at
Sat Dec 18 16:43:29 CET 2004

On Saturday 18 December 2004 16:35, Boudewijn Rempt wrote:
> For everyone's information: Casper has started work on autolayers and a
> revised, faster datamanager around a better tile system. For now he's doing
> this on a branch, autolayers_branch, because it is quite disruptive and I
> don't want to spoil the chance we have for inclusion in KOffice 1.4.
Yes and I have some questions about the ramifications.

Now that layers are about to automatically resize themselves it poses some 
questions about the functionallity

But first a little background: Until now the layers had fixed sizes, and the 
user had to resize them. With the new system the layers or indeed any 
paint_device have size 0x0 to start with and then whenever painting is done 
the paint_device automatically grows.

Coupled with this autoresizing I've also encapsulated the tiles in a 
datamanger, so from now on only the datamanger knows about tiles. For 
everyone else (even the paint_device) it's just a "canvas"

To make this work I've outcommented a lot of functionallity, and this is where 
my questions come in:

what is the beginning and end for an iterator not explicitly initialized. My 
suggestion is that we should require start/end to be explicitly given thus 
avoiding any problems. Alternatively I have an iterator that only visit 
pixels that have been "activated" (ie someone has written them to the 
canvas.) Also I can provide the current extent of the canvas, but I think 
that unless absolutey needed we should avoid that.

what is the normal working area for tools like gradient and fill (in photoshop 
fill works on the part of the layer inside the image dimensions)

what about rotate,scale and such. My suggestion is that these kind of 
operations should work on selections.

Bart has developed a infinite iterator. I have outcommented it (It wasn't 
really used much), but the underlying idea is good. However my intention is 
to have an infinite paint_device instead to do the same job. Perhabs, you 
Bart could come with some insights as to how to go about this. This inifinite 
paint_device would also be useful as a replacement (or rather underlying 
structure) for the KisBackground.

best regards
Casper Boemann

More information about the kimageshop mailing list