<br><br><div class="gmail_quote">On Wed, Sep 9, 2009 at 11:22 PM, Boudewijn Rempt <span dir="ltr">&lt;&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 09 September 2009, Dmitry Kazakov wrote:<br>
<br>
&gt; Ideally, we should free filters from doing this dirty work. Selections<br>
&gt; should be our internal routine... Ideally...<br>
&gt; Another question - how to implement it?<br>
<br>
</div>Historically, selections were part of a paint device. When we decided that<br>
that was a Bad Thing, it became necessary to pass selections to interested<br>
routines. The only way to make filters work without an explicit selection<br>
parameter is to copy the data before passing it to a filter and then blitting<br>
it back with the selection set on the painter. I don&#39;t think that&#39;s worth it:<br>
let&#39;s just fix the filters.<br></blockquote><div><br>That is not good API solution. In the worst case we will have to introduce unified way of iterating through pixels taking selections into account. Other way we get the same unmaintainable pieces of different code like in layer&#39;s updateProjection stuff. Every layer has it&#39;s own implementation of masks application and every implementation is wrong in it&#39;s own way. <br>
<br>We&#39;ll get the same stuff with filters if we decide to do selections inside of them without any system.<br></div></div><br><br clear="all">PS:<br>kis_layer&#39;s stuff is already fixed<br><br>-- <br>Dmitry Kazakov<br>