exactBounds

Sven Langkamp sven.langkamp at gmail.com
Tue Jul 17 13:27:32 CEST 2007


On 7/17/07, Cyrille Berger <cberger at cberger.net> wrote:
> Hi,
>
> 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.

> >  Affected
> > by this are e.g. setDirty and selectedExact rect.
> > At the moment I'm using setDirty(image->bounds()) to work around that.
> > So either exactBounds() is wrong or it was misused in 1.6.
>
> why is it a problem for setDirty ? If you want to dirty the complete paint
> device, just call setDirty();
setDirty will only dirty the exactBounds, but it should dirty the
whole paintdevice e.g. after changing the defaultpixel.


More information about the kimageshop mailing list