Easy layer access for rgb8 filters.

Casper Boemann cbr at boemann.dk
Mon Jan 17 13:34:42 CET 2005


On Monday 17 January 2005 13:25, Michael Thaler wrote:
> On Monday 17 January 2005 12:44, you wrote:
> > How hard would it be to keep track of the exact extent of a layer? I.e.,
> > in the border tiles figure out what left-most, top-most, bottom-most and
> > right-most pixels are?
>
> Maybe we should not keep track of the exact extent of a layer, if it makes
> everything much more complicated?
>
> In the case you load an image, I imagine that the layer has either the size
> of the image or the size of the tiles that cover the image (the second on
> is bigger). If you move the image, the extent of the layer should not
> change, it should only be at a different position. If you paint outside the
> layer, the layer should automatically crow to the new extent (I suppose the
> new size should just be the size of the smallest rectangle that covers all
> the pixels or the size of the smallest rectangle arround all the tiles that
> cover the image).
>
> I had a problem in the beginning with not being able to get the exact width
> and height of an image. But the more I think about it, the more I think it
> is ok to just get the size of the smallest rectangle around all the tiles
> that cover the image. Getting the exact extent would be better, but if that
> makes everything much more complicated and even slower, then we shouldn't
> do it.
>
my thoughts EXACTLY

I might be able to make an exact fit if we believe that an iterator is always 
walked all the way through. That way I could update the extent whenever an 
iterator is created. My first thought of an exact fit was to update the 
extent whenever the iterator moves a single pixel (thus the huge overhead I 
feared). Should I do this ??

best regards
Casper Boemann


More information about the kimageshop mailing list