Bug 146986 - opacity control doesn't work with the eraser
Summary: opacity control doesn't work with the eraser
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-20 01:59 UTC by Elián Hanisch
Modified: 2007-12-15 16:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elián Hanisch 2007-06-20 01:59:55 UTC
Version:           1.6.3 (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

I don't know if this is the intended behaviour or not, but the opacity control doesn't change the intensity of the pixel eraser tool, it always works at 100%. Since the pixel eraser is together with the pixel brush, isn't the opacity control supposed to affect both?
Comment 1 Halla Rempt 2007-06-20 09:20:50 UTC
Good point -- I'm not quite sure how it is supposed to work, but I see that we 
pass the opacity on in the erase paintop, but don't use it in the erase 
composite ops. We need to look at that.
Comment 2 Cyrille Berger 2007-06-20 09:57:25 UTC
SVN commit 677934 by berger:

- make the opacity control affects the eraser painting operation

BUG:146986


 M  +2 -1      KoCompositeOpErase.h  


--- trunk/koffice/libs/pigment/compositeops/KoCompositeOpErase.h #677933:677934
@@ -55,7 +55,6 @@
     {
         // XXX: How to use channelflags here? It would be cool to
         // erase all green from an image, for example.
-        Q_UNUSED( U8_opacity );
         Q_UNUSED( channelFlags );
         while (rows-- > 0)
         {
@@ -78,6 +77,8 @@
                     }
                     mask++;
                 }
+                srcAlpha = KoColorSpaceMaths<channels_type>::multiply( NATIVE_OPACITY_OPAQUE - srcAlpha, U8_opacity);
+                srcAlpha = NATIVE_OPACITY_OPAQUE - srcAlpha;
                 d[_CSTraits::alpha_pos] = KoColorSpaceMaths<channels_type>::multiply(srcAlpha, d[_CSTraits::alpha_pos]);
             }
 
Comment 3 Elián Hanisch 2007-07-22 20:18:26 UTC
sorry for the long delay, but for which version of krita did this get fixed? I compiled koffice 1.6 from svn and the eraser opacity control still doesn't work...
Comment 4 Cyrille Berger 2007-07-22 20:46:51 UTC
Hi it was fixed in the developement version, as no further version of 1.6 is planned it wasn't applied to the 1.6 branch.
Comment 5 Elián Hanisch 2007-07-23 02:55:48 UTC
Then I'll have to wait until its release, sometimes I find difficult to paint with the current Krita if the eraser is always set at 100%. Using the brush with the background color is a solution but it isn't applicable all the times. 
Thanks for your help.
Comment 6 Halla Rempt 2007-12-15 16:16:16 UTC
SVN commit 748797 by rempt:

Implement opacity control for 8 bit rgb eraser.
CCBUG: 146986


 M  +3 -1      kis_rgb_colorspace.cc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=748797
Comment 7 Halla Rempt 2007-12-15 16:21:50 UTC
SVN commit 748801 by rempt:

CCBUG:146986
Also patch u16 rgb, since that's what Elian uses.


 M  +3 -1      kis_rgb_u16_colorspace.cc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=748801