[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: KisSelection vs. KisPixelSelection
From: Dmitry Kazakov <dimula73 () gmail ! com>
Date: 2010-06-20 11:29:35
Message-ID: AANLkTilRx4970cPQ7bni3-U_aCVeeNH6Ze5sUFfDjgPW () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Sun, Jun 20, 2010 at 3:18 PM, Sven Langkamp <sven.langkamp@gmail.com>wrote:
> On Sun, Jun 20, 2010 at 12:58 PM, Dmitry Kazakov <dimula73@gmail.com>wrote:
>
>>
>> I've wrote about this issue:
>> http://wiki.koffice.org/index.php?title=Krita/KisSelection_Issues
>>
>> Sven, could you comment on it?
>>
>
> I don't agree. Currently KisSelection is designed to be basically read-only
> for tools and filters. Inheriting from KisPixelSelection would break that.
>
Is it read only? It has public inheritance, so, i guess, it isn't? At least
move() is not hidden.
> Suddenly it would be possible to edit the KisSelection even though it is
> just the projection. Additionally selection could be nested, because you
> could put a KisSelection into a KisSelection. It's the same the relation as
> for group layer and normal layers.
>
Inheriting KisSelection from KisPixelSelection does not prevent it. Just
think like the projection of KisSelection will be stored as a
KisPixelSelection object instead of pure KisPaintDevice. Then adding a child
KisSelection will fit naturally in it.
> If you want to reduce the code duplication it's probably better to use a
> common base class for them.
>
How? Could you describe it a bit? I don't fully understand.
--
Dmitry Kazakov
[Attachment #5 (text/html)]
<br><br><div class="gmail_quote">On Sun, Jun 20, 2010 at 3:18 PM, Sven Langkamp <span \
dir="ltr"><<a href="mailto:sven.langkamp@gmail.com">sven.langkamp@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="gmail_quote"><div class="im">On Sun, Jun 20, 2010 at 12:58 PM, Dmitry Kazakov \
<span dir="ltr"><<a href="mailto:dimula73@gmail.com" \
target="_blank">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;">
<br>I've wrote about this issue: <a \
href="http://wiki.koffice.org/index.php?title=Krita/KisSelection_Issues" \
target="_blank">http://wiki.koffice.org/index.php?title=Krita/KisSelection_Issues</a><br><br>Sven, \
could you comment on it?<br>
</blockquote></div><div><br>I don't agree. Currently KisSelection is designed to \
be basically read-only for tools and filters. Inheriting from KisPixelSelection would \
break that. </div></div></blockquote><div><br>Is it read only? It has public \
inheritance, so, i guess, it isn't? At least move() is not hidden.<br> \
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: \
1px solid rgb(204, 204, 204); padding-left: 1ex;"><div \
class="gmail_quote"><div>Suddenly it would be possible to edit the KisSelection even \
though it is just the projection. Additionally selection could be nested, because you \
could put a KisSelection into a KisSelection. It's the same the relation as for \
group layer and normal layers.<br> </div></div></blockquote><div><br>Inheriting \
KisSelection from KisPixelSelection does not prevent it. Just think like the \
projection of KisSelection will be stored as a KisPixelSelection object instead of \
pure KisPaintDevice. Then adding a child KisSelection will fit naturally in it.<br> \
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div \
class="gmail_quote"><div> If you want to reduce the code duplication it's \
probably better to use a common base class for \
them.<br></div></div></blockquote><div><br>How? Could you describe it a bit? I \
don't fully understand.<br clear="all"> </div></div><br>-- <br>Dmitry Kazakov<br>
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic