<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>391268</bug_id>
          
          <creation_ts>2018-03-01 22:03:11 +0000</creation_ts>
          <short_desc>Smudge brush cannot draw black on masks</short_desc>
          <delta_ts>2018-04-03 11:46:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Brush engines</component>
          <version>4.0.0-beta.1</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="ZSpratt">zachman331</reporter>
          <assigned_to name="Dmitry Kazakov">dimula73</assigned_to>
          <cc>griffinvalley</cc>
    
    <cc>halla</cc>
          
          <cf_commitlink>https://commits.kde.org/krita/677b1f6a1d3b2dcdecb6309ce13e77808f59a1a7</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1735059</commentid>
    <comment_count>0</comment_count>
    <who name="ZSpratt">zachman331</who>
    <bug_when>2018-03-01 22:03:11 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735063</commentid>
    <comment_count>1</comment_count>
    <who name="wolthera">griffinvalley</who>
    <bug_when>2018-03-01 22:19:52 +0000</bug_when>
    <thetext>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&apos;s confused on how to handle this alpha color space, because there black is transparent! So it just goes, well, this is transparent, let&apos;s not do anything :p

Some qdebugs show this quite clearly:

With darkgray:
Color                   &quot;Alpha 63335&quot;
dulling                 &quot;Alpha 46893&quot;
dulling after composite &quot;Alpha 47741&quot;

with black
Color                   &quot;Alpha 0&quot;
dulling                 &quot;Alpha 65535&quot;
dulling after composite &quot;Alpha 65535&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1742619</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2018-04-02 14:16:38 +0000</bug_when>
    <thetext>Git commit 7598fff3f4c9e5058f17b3ff5252782ce0c9fdd2 by Dmitry Kazakov.
Committed on 02/04/2018 at 14:16.
Pushed by dkazakov into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1742845</commentid>
    <comment_count>3</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2018-04-03 11:46:36 +0000</bug_when>
    <thetext>Git commit 677b1f6a1d3b2dcdecb6309ce13e77808f59a1a7 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 03/04/2018 at 11:20.
Pushed by rempt into branch &apos;krita/4.0&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>