bltSelection and fill bucket

Cyrille Berger cberger at cberger.net
Sun Nov 23 23:47:57 CET 2008


Hi,

Investigating, https://bugs.kde.org/show_bug.cgi?id=174577, I found the 
problem (or shall I say the problems):
* in kis_fill_painter.cc:223 (function KisFillPainter::genericFillEnd) we call 
selectedExactRect which return the intersection of the exact rect of 
selection with the exact rect of the current layer (which becomes null in 
case of an empty layer)
* the second problem comes from bltSelection, which interest the rectangle 
where we want to apply the selection with the exactBounds of the paint 
device, it's line kis_painter.cc:410 :
     srcRect &= srcdev->exactBounds();

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.

But I am not sure how to solve the problem of bltSelection intersecting the 
rect. Shall I remove the line kis_painter.cc:410 ? Any better idea ?

-- 
Cyrille Berger


More information about the kimageshop mailing list