New idea about Grayscale Selections problem

Dmitry Kazakov dimula73 at gmail.com
Sun Feb 10 07:30:11 UTC 2013


> This doesn't fix the problem as it's not a problem at dab level. Dab
> always need a alpha channel, otherwise you just get square blobs.
>

Heh, it seems like I forgot to tell the main idea, the dabs created with
the methods would have a different colorspace (grey + alpha), which would
be composed by multicolorspace composite ops.


> There is also Indirect painting which wouldn't be covered by that.
>

Yes, Indirect painting is still the problem.


> Other tools would still have the problem like the fill and gradient
> tool.
>

Actually, Fill and Gradient tools create internal "dabs" represented by
usual KisPaintDevice object. So it should work for them.



> I think the only way to solve this is that the tool will get a
> gray+alpha paint device. I more and more favor that we switch the
> pixel selection colospace to that. It's the only way to solve that for
> all tools without messing with composite ops.
>

Well, probably, we could think over the idea of having
KisSelection::paintDevice() again... But we should first consider a few
problems very carefully:

1) On the start of every transaction over KisSelection::paintDevice() the
selection should be flattened to have a paint device only.
2) On the start of every transaction over KisSelection::pixelSelection()
the selection should be flattened to have a pixel selection only.
3) (What should we do on the creation of a vector selection in a selection
having a pixel selection?)
4) All the flatten events should be undo/redo'able
5) The KisSelection::paintDevice() object should still be in some special
colorspace, that can be composed into alpha() colorspace properly.

Actually, problems 2 and 4 are to be solved anyway, because currently we
have a few bugs due to it.
Problems 1 and 2 should be somehow solved internally inside the
KisSelection, that it we shouldn't ask the user-code to flatten it every
time manually.


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


More information about the kimageshop mailing list