Painting on selections and selection masks

Dmitry Kazakov dimula73 at gmail.com
Fri Oct 28 18:45:28 UTC 2011


> > 2) When a tool decides to paint on a mask, it creates a dab, that is
> > generated in a usual two-channel grayscale colorspace
>
> No, it tries to create a dab in the colorspace of the target paint device
> -- i.e., a one channel grayscale colorspace. This doesn't work. Nor do I
> believe is dab creation the only place where having no alpha channel gives
> problems.
>
> I tried to special case dab creation -- i.e., check whether there's an
> alpha channel, if not, create the dab in the equivalent colorspace with
> alpha channel, and then convert the dab to a colorspace without the alpha
> channel, but that was, to me, very hacky.
>

Adding a property to a node removes "hackyness" from this. KisNode's method
may return paintdDevice()->colorSpace()

> What is the problem here? Tools can get a colorspace of the dab for the
node
> using an additional method of KisNode. We can add it if needed.

If I understand your proposition correctly you want to add an extra method
> to KisPaintDevice, something like "dabColorSpace"?
>

Exactly.


> I don't think that design will be solid -- not when the rest of Krita
> thinks it will always find an alpha channel. Just check the code for the
> outline generator, for instance...
>

But it actually is an advantange of this approach -- all the dabs will have
alpha channel, so expectations of the outline generator would be right. But
the masks won't have an alpha. The latter way is how the things work
currently. And the tools which know nothing about new method will work as
they used to work: they will create dubs in the colorspace of the
paintDevice()


-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20111028/877580ee/attachment.html>


More information about the kimageshop mailing list