Fill_painter broken and colordistance in autolayer
cbr at boemann.dk
Mon Dec 27 16:56:16 CET 2004
----- Original Message -----
From: "Bart Coppens" <kde at bartcoppens.be>
> I've had a quick look at the changes in your branch, and at first sight it
> doesn't seem too difficult to make those changes work. The only thing that
> comes to my mind is how I should deal with the size of the layer.
> I'm using an array the size of the layer I'm filling, where I store
> that pixel has been filled or not.
Yes I saw that, which is the reason I didn't trivially update your code.
> Now is there a way to get some estimates on how big the current layer is,
> only for this array, but also for having a limit on how much to fill?
> filling a blank layer, without knowing its size).
I can make a function that gives an estimate, but it is most probably not
what the user would expect. If I remember correctly photoshop limits the
flood by the image borders, perhabs we should do that too ? That is probably
also the most intuitive.
unlimited flooding outside the borders of the image is not an option as the
layer would grow to 2^32 in each direction. (well we would run out of memory
before, but you get the picture)
The blank layer has size 0x0, but if it's current and you floodfill you
would expect some sort of result. In my mind I would expect the image to be
filled. Do you have other ideas/suggestions?
> Currently, the code uses the
> regular iterators with a '-1' for width, but I don't see your code
No because layers/paintdevices have no fixed size.
More information about the kimageshop