Bug 322184

Summary: Clone Brush doesn't clone correctly when cloning not-fully-opaque strokes
Product: [Applications] krita Reporter: Bollebib <kwadraatnope>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, halla
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Bollebib 2013-07-10 09:09:31 UTC
http://tinypic.com/view.php?pic=x0sjsp&s=5

see screenshot

the stroke left is on a different layer than the background
the stroke right is the clone brush,without dynamics,with simple brush tip.

Apparantly the not-fully-opaque lines get maxized to 100%,which gives non)accurate results
Comment 1 Halla Rempt 2013-07-20 08:47:14 UTC
Ack -- I can confirm the bug. Pretty weird, I'm sure this is a regression.
Comment 2 Dmitry Kazakov 2013-08-26 20:46:22 UTC
It happens because the copied pixels are painted over destination with COMPOSITE_OVER op. This results in the alpha channel of the pixels being saturated with the time. One possible solution would be:

1) Duplicate Op could use Indirect Painting
2) It would paint over Indirect Painting device with COMPOSITE_COPY op
3) The indirect device would copy its data into original with the composite op, chose by the user
Comment 3 Dmitry Kazakov 2013-08-27 08:32:36 UTC
Git commit 9c992e59ffa463afbcbc979985c790b42fc508ef by Dmitry Kazakov.
Committed on 27/08/2013 at 08:31.
Pushed by dkazakov into branch 'master'.

Added support for choosing the composite op for Indirect Painting mode

Now the KisPainOpSettings-based class is allowed to choose which composite
op should be use for indirect painting mode. This is used by duplicate op,
which resets the op to COMPOSITE_COPY to store a real copy of the layer on
a temporary paint device.

M  +5    -0    krita/image/brushengine/kis_paintop_settings.cpp
M  +7    -0    krita/image/brushengine/kis_paintop_settings.h
M  +12   -0    krita/image/kis_stroke_strategy.cpp
M  +3    -0    krita/image/kis_stroke_strategy.h
M  +15   -15   krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +6    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
M  +1    -0    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
M  +1    -0    krita/plugins/paintops/dynadraw/kis_dyna_paintop.cpp
M  +2    -1    krita/ui/tests/freehand_stroke_test.cpp
M  +3    -3    krita/ui/tool/kis_figure_painting_tool_helper.cpp
M  +5    -0    krita/ui/tool/kis_resources_snapshot.cpp
M  +1    -0    krita/ui/tool/kis_resources_snapshot.h
M  +3    -4    krita/ui/tool/kis_tool_freehand_helper.cpp
M  +7    -3    krita/ui/tool/strokes/freehand_stroke.cpp
M  +3    -1    krita/ui/tool/strokes/freehand_stroke.h
M  +4    -3    krita/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp
M  +2    -1    krita/ui/tool/strokes/kis_painter_based_stroke_strategy.h

http://commits.kde.org/calligra/9c992e59ffa463afbcbc979985c790b42fc508ef