Bug 194476 - stylus doesn't work in rgb 16
Summary: stylus doesn't work in rgb 16
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Cyrille Berger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 22:35 UTC by Elián Hanisch
Modified: 2010-03-01 11:36 UTC (History)
1 user (show)

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 2009-05-28 22:35:24 UTC
Version:           2.1 Alpha (using 4.2.2 (KDE 4.2.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.28-11-generic

there's so odd behaviour when working with rgb 16bits and a wacom tablet, its like the pressure curve has a big step, and using the stylus softly doesn't paint anything. I tested with rgb 8bits and works normally.

1. start a new document rgb 16bits
2. try to paint a line with the stylus, start the line by pressing softly and continue increasing the pressure.
3.  the stylus doesn't paint at low pressures
Comment 1 Halla Rempt 2009-05-31 14:11:59 UTC
Yes, I've seen this too. Probably something stupid in the opacity paintop option.
Comment 2 Halla Rempt 2009-05-31 15:20:47 UTC
I'm thinking that this line:

painter->setOpacity((qint8)qBound<qint32>(OPACITY_TRANSPARENT, opacity, OPACITY_OPAQUE ));

should be:

painter->setOpacity((quint8)qBound<qint32>(OPACITY_TRANSPARENT, opacity, OPACITY_OPAQUE ));

And maybe we should use qreals here, but that doesn't solve the problem yet.
Comment 3 Halla Rempt 2009-05-31 15:45:31 UTC
Ok, the problem is not in the paintop. I think the alpha-darken compositeop is broken for 16 bit rgb, since only opacity == 255 is painted, and when I use buildup mode, brush looks like pencil (which would mean that other 16 bit compositeops are broken, too).
Comment 4 Halla Rempt 2009-05-31 16:29:40 UTC
SVN commit 975973 by rempt:

Scale the opacity before compositing

I didn't scale the opacity to the native channeltype,
so painting on 16 bit colorspaces was broken. This needs
probably backporting.

CCBUG:194476

(Note: painting in 16bit mode is still broken, just not as broken
as before...)

 M  +4 -2      KoCompositeOpAlphaDarken.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=975973
Comment 5 Cyrille Berger 2009-12-06 11:59:28 UTC
Seems to work for me, can this still be reproduced ?
Comment 6 Elián Hanisch 2010-03-01 11:36:58 UTC
seems that way :D