<br><br><div class="gmail_quote">On Fri, Apr 9, 2010 at 2:04 PM, Cyrille Berger <span dir="ltr">&lt;<a href="mailto:cberger@cberger.net">cberger@cberger.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wednesday 24 March 2010, Dmitry Kazakov wrote:<br>
&gt; Hmm.. I&#39;ve added these functions just recently:<br>
&gt; <a href="http://websvn.kde.org/?view=revision&amp;revision=1099644" target="_blank">http://websvn.kde.org/?view=revision&amp;revision=1099644</a><br>
&gt;<br>
&gt; The logic was the following:<br>
&gt;<br>
&gt; extent() - is the area where the node has an influence on the result image.<br>
&gt; In other words, it is an area, where we should update when the layer<br>
&gt; changes it&#39;s visibility.<br>
&gt;<br>
&gt; KisMask::extent() - works right this way. It tells the area, where<br>
&gt; selection is. And this is right for most of the masks, except of the<br>
&gt; transparency mask. A transparency mask changes the entire image, except of<br>
&gt; the selection. It means that we should update everywhere, except of the<br>
&gt; selection. And if we don&#39;t have parent, we can&#39;t do anything.<br>
<br>
</div>Btw, shouldn&#39;t that be:<br>
<br>
QRect KisTransparencyMask::extent() const<br>
{<br>
    return parent() ? parent()-&gt;extent().intersect(selection().extent()) :<br>
QRect();<br>
}<br>
<br>
QRect KisTransparencyMask::exactBounds() const<br>
{<br>
    return parent() ? parent()-<br>
&gt;exactBounds().intersect(selection().exactBounds()) : QRect();<br>
}<br>
<br>
(which would be true for all masks, no ?)<br></blockquote><div><br>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&#39;s content and paint&#39;s it&#39;s selection on the top.<br>
<br>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.<br></div></div><br clear="all"><br>-- <br>Dmitry Kazakov<br>