Bug 465086

Summary: Clone brush cursor is improperly rendered
Product: [Applications] krita Reporter: Freya Lupen <penguinflyer2222>
Component: GeneralAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: amy, raghu
Priority: NOR Keywords: regression
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 455570    
Attachments: screenshot showing the x mark

Description Freya Lupen 2023-01-31 16:05:21 UTC
SUMMARY
The clone brush engine has two cursors; one for the source and one for the destination.
The destination cursor is marked by an X to distinguish it. However, after commits 2e81d96f and 095491e5, this X is not confined inside of the outline. It seems to be positioned at the document origin, so that when the cursor is at the top left of the image it appears normal, but as it moves away the X becomes stretched between the origin and the cursor.

Reverting 095491e5 "Fix caching in KisOptimizedBrushOutline" places the X at the origin without stretching. Additionally reverting 2e81d96f "Optimize KisOptimizedBrushOutline::boundingRect() further" restores the correct behavior.

STEPS TO REPRODUCE
1. Open a document.
2. Select a Clone Engine brush (default is called "v) Clone Tool").
3. Move the cursor around the document, towards and away from the top-left corner.

OBSERVED RESULT
Distorted X outside cursor.

EXPECTED RESULT
X fitted inside cursor.

SOFTWARE/OS VERSIONS
Krita 5.2.0-prealpha git hash e659b1ba.
Comment 1 amyspark 2023-01-31 16:12:15 UTC
Both commits are a fix intended for 455570. Assigning to Dmitry, but please expect some delay as to the resolution.
Comment 2 Raghavendra kamath 2023-03-31 13:56:17 UTC
Created attachment 157743 [details]
screenshot showing the x mark

In addition to this there is occasional X mark on normal brushes too with an offset. Attaching a screenshot of a normal non clone brush having the x mark appear on canvas randomly
Comment 3 Dmitry Kazakov 2023-04-13 13:50:16 UTC
Git commit 86312477b451bc774d463f1228b671d28610faac by Dmitry Kazakov.
Committed on 13/04/2023 at 13:49.
Pushed by dkazakov into branch 'master'.

Fix outline issues caused by the optimized outline refactoring
Related: bug 467006, bug 455570

M  +2    -2    libs/image/brushengine/KisOptimizedBrushOutline.cpp

https://invent.kde.org/graphics/krita/commit/86312477b451bc774d463f1228b671d28610faac