<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> 2) When a tool decides to paint on a mask, it creates a dab, that is<br>
> generated in a usual two-channel grayscale colorspace<br>
<br>
</div>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.<br>
<br>
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.<br>
</blockquote><div class="im"><br>Adding a property to a node removes "hackyness" from this. KisNode's method may return paintdDevice()->colorSpace() <br> <br>
> What is the problem here? Tools can get a colorspace of the dab for the node<br>
> using an additional method of KisNode. We can add it if needed.<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;">If I understand your proposition correctly you want to add an extra method to KisPaintDevice, something like "dabColorSpace"?<br>
</blockquote><div><br>Exactly.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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...<br></blockquote><div><br>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()<br>
</div></div><br clear="all"><br>-- <br>Dmitry Kazakov<br>