exactBounds

Casper Boemann cbr at boemann.dk
Tue Jul 17 19:26:32 CEST 2007


On Tuesday 17 July 2007 13:27, Sven Langkamp wrote:
> > KisPaintDevice::exactBounds is intented to return the bound of the paint
> > device, aka the rectangle where there are pixels on the paint device, and
> > it has allways been the case in 1.5/1.6, and if its different in 2.0,
> > then you have found a bug ;) . Beside, a paint device is not necesseraly
> > use with an image.
>
> In selectedExactRect there is (for defaultpixel != SELECTED_MIN):
> exactBounds().unite(m_parentPaintDevice->exactBounds());
> Which I think should return the image bounds.
no it should return where there are affect _actual_ pixels. Which is why we 
united we the actual pixels of the device when default is not MIN

Two kind of operations can be thought of:
 - do stuff to every pixel selected. As in filling the entire selection.
 - do stuff with selected pixels. As in copying what you have selected

setDirty in your case is of the first kind. For that you need to do some extra 
stuff yourself. Please don't change the method. I however think there is 
another method called something like "does this rect boud everything" that 
you might be able to use (this is off the top of my head though)


-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list