Patch to fix selection test and mask extent

Cyrille Berger cberger at
Fri Apr 9 20:33:03 CEST 2010

On Friday 09 April 2010, Dmitry Kazakov wrote:
> It is true for all the masks, except a transparency mask. The transparency
> mask is special, because it influences the entire image. It removes *all*
> the image's content and paint's it's selection on the top.
> If you change transparency mask extent back, there will be a bug showing
> that: the image will be updated wrongly after you switch off/on visibility
> of the transparency mask.
But doesn't that mean that the current rectangle is too eager ?

I mean, imagine we have (x1,y1,x2,y2):
paintlayer rect = (10,10,20,20)
	transparencymask rect = (14,14,18,18)

if we paint on paint layer on area (9,9,11,11), it shouldn't trigger any 
update, right ?

I wonder what effect it has if for instance we have this:
paintlayer rect = (10,10,20,20)
	transparencymask rect = (14,14,18,18)
	blur filter

Does that mean that we recompute the filter on the (10,10,20,20) area ?

And solution to the switch off/on could be to call an update on the whole 
parent layer. Or somehow detect that the projection of the layer and its mask 
have a smaller extent and that the data need to be cleared (that would also 
solve it for when a totaly new area of the transparency mask is selected).

Cyrille Berger

More information about the kimageshop mailing list