Bug 465086 - Clone brush cursor is improperly rendered
Summary: Clone brush cursor is improperly rendered
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks: 455570
  Show dependency treegraph
 
Reported: 2023-01-31 16:05 UTC by Freya Lupen
Modified: 2023-04-13 13:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot showing the x mark (36.48 KB, image/png)
2023-03-31 13:56 UTC, Raghavendra kamath
Details

Note You need to log in before you can comment on or make changes to this bug.
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