bltSelection and fill bucket

Cyrille Berger cberger at cberger.net
Mon Nov 24 19:54:52 CET 2008


Hi,

On Monday 24 November 2008, Boudewijn Rempt wrote:
> That's weird, though, since here the src dev is the filled paint device,
> which is isn't empty, but filled to the size of m_width and m_height.
> Unless we do that through setting the default pixel, but that doesn't seem
> the case, so if srcRect is correct, then this line should not be a problem.
Oh right it's not srcRect the problem ! Since it's srcdev... stupid me :(

Now I have found the problem it's
     if (selMask->isProbablyTotallyUnselected(QRect(dx, dy, sw, sh))) {
         return;
     }

and it's only a problem when the paint device is completely empty, if there is 
a little stroke around where you start the fill, it fill out of the 
exactBound of the paint device. But if there is nothing 
isProbablyTotallyUnselected return true.

> > The solution to the first problem is easy, calling
> >     bltSelection(0, 0, compositeOp(), filled, m_fillSelection, opacity(),
> > 0, 0, m_width, m_height);
> > instead would work.
>
> Yes -- or unite rc with filled.bounds().
Well filled is of size (0,0,m_width,m_height) :) It would be better to have 
access to the exactBound of the selection but it's private business :(

-- 
Cyrille Berger


More information about the kimageshop mailing list