KisSelection vs. KisPixelSelection

Dmitry Kazakov dimula73 at gmail.com
Sun Jun 20 13:29:35 CEST 2010


On Sun, Jun 20, 2010 at 3:18 PM, Sven Langkamp <sven.langkamp at gmail.com>wrote:

> On Sun, Jun 20, 2010 at 12:58 PM, Dmitry Kazakov <dimula73 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100620/637bb628/attachment.htm 


More information about the kimageshop mailing list