<div class="gmail_quote">On Sat, Jun 19, 2010 at 9:17 AM, Dmitry Kazakov <span dir="ltr"><<a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br><br><div class="gmail_quote">On Sat, Jun 19, 2010 at 11:03 AM, Dmitry Kazakov <span dir="ltr"></span>wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Why does KisSelection inherit KisPaintDevice instead of KisPixelSelection? They share so much code!<br clear="all"></blockquote></div><br></div>Btw, is KisSelection used as a paint device anywhere? And is it used used as a paint device for *writing*? <br>
<br>The second point is even more important, i think, because in case we do any transformations to KisSelection (just right the thing mpeg wanted to do recently) we must flatten all shape and pixel selections into a single pixel selection first[1]. Does it happen so now?<br>
<br>[1] - it means that there will be no shape selections left after flattening.<br></blockquote></div><br>KisSelection doesn't inherit from KisPixelSelection, because it's just a projection for pixel and shape selection. Every time you want to do something with the selection you have to apply the operation to the pixel and vector selection and not to the KisSelection, because otherwise the KisSelection would be reset the next time the projection is updated.<br>