Bug 391268 - Smudge brush cannot draw black on masks
Summary: Smudge brush cannot draw black on masks
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.0.0-beta.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-03-01 22:03 UTC by ZSpratt
Modified: 2018-04-03 11:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ZSpratt 2018-03-01 22:03:11 UTC
When using the smudge brush to paint onto a transparency or filter mask, only white can be drawn.
Black has no effect, and lighter colors appear as white, regardless of brightness.
Comment 1 wolthera 2018-03-01 22:19:52 UTC
Caused by the colorsmudge fix after the first beta.

From what I gather, the problem is on ln 282 in the composite there. You see, transparency masks are alpha colorspaces. I think it's confused on how to handle this alpha color space, because there black is transparent! So it just goes, well, this is transparent, let's not do anything :p

Some qdebugs show this quite clearly:

With darkgray:
Color                   "Alpha 63335"
dulling                 "Alpha 46893"
dulling after composite "Alpha 47741"

with black
Color                   "Alpha 0"
dulling                 "Alpha 65535"
dulling after composite "Alpha 65535"
Comment 2 Dmitry Kazakov 2018-04-02 14:16:38 UTC
Git commit 7598fff3f4c9e5058f17b3ff5252782ce0c9fdd2 by Dmitry Kazakov.
Committed on 02/04/2018 at 14:16.
Pushed by dkazakov into branch 'master'.

Fix painting with colorsmudge brushes on transparency masks

We should create a correct composition source device. The precise copy
of the device cannot create it correctly, we should do that manually.

M  +24   -0    libs/image/KisPrecisePaintDeviceWrapper.cpp
M  +14   -0    libs/image/KisPrecisePaintDeviceWrapper.h
M  +7    -8    plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp

https://commits.kde.org/krita/7598fff3f4c9e5058f17b3ff5252782ce0c9fdd2
Comment 3 Halla Rempt 2018-04-03 11:46:36 UTC
Git commit 677b1f6a1d3b2dcdecb6309ce13e77808f59a1a7 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 03/04/2018 at 11:20.
Pushed by rempt into branch 'krita/4.0'.

Fix painting with colorsmudge brushes on transparency masks

We should create a correct composition source device. The precise copy
of the device cannot create it correctly, we should do that manually.
(cherry picked from commit 7598fff3f4c9e5058f17b3ff5252782ce0c9fdd2)

M  +24   -0    libs/image/KisPrecisePaintDeviceWrapper.cpp
M  +14   -0    libs/image/KisPrecisePaintDeviceWrapper.h
M  +7    -8    plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp

https://commits.kde.org/krita/677b1f6a1d3b2dcdecb6309ce13e77808f59a1a7