<br><br><div class="gmail_quote">On Wed, Sep 9, 2009 at 11:22 PM, Boudewijn Rempt <span dir="ltr"><></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>
> Ideally, we should free filters from doing this dirty work. Selections<br>
> should be our internal routine... Ideally...<br>
> 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't think that's worth it:<br>
let'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's updateProjection stuff. Every layer has it's own implementation of masks application and every implementation is wrong in it's own way. <br>
<br>We'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's stuff is already fixed<br><br>-- <br>Dmitry Kazakov<br>