Bug 412309

Summary: Quick Brush Engine: painting doesn't match outline
Product: [Applications] krita Reporter: Lynx3d <lynx.mw+kde>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshots showing the issue

Description Lynx3d 2019-09-25 09:12:40 UTC
Created attachment 122855 [details]
Screenshots showing the issue

SUMMARY
The actual area that the Quick Brush Engine (using "b)_Basic-1" brush Preset) doesn't match the cursor outline. It seems the size is one pixel larger then it should be, going out of the previewed outline on the right and bottom.
This makes it harder to draw and especially erase precisely with this brush because the center of brush and outline don't match.


STEPS TO REPRODUCE
1. Choose "b)_Basic-1" brush preset at some smaller size (like between 5-10px)
2. Zoom into the canvas a bit (200-400%) to better see the issue
3. Make sure your mouse doesn't move and click somewhere on the canvase

OBSERVED RESULT
When you compare the cursor outline with painted dot, they don't match properly, the dot seems to go 1 pixel outside to the left and bottom. It becomes more apparent when painting over with a different round brush like Basic-2_Opacity (see attachment)

EXPECTED RESULT
Painted area should touch the cursor outline equally on all sides.

ADDITIONAL INFORMATION
Master branch at f5dd77bf83aebe7eeb34a1fc17547f9df167df8d
Qt Version: 5.12.5
Comment 1 Ahab Greybeard 2019-09-25 09:58:34 UTC
I can confirm this on 4.3.0-prealpha (git 02bdc53)
Comment 2 wolthera 2020-08-14 12:59:42 UTC
Git commit a8716a2573d098e0103305e4bfaf0824647844a5 by Wolthera van Hövell tot Westerflier.
Committed on 14/08/2020 at 12:59.
Pushed by woltherav into branch 'master'.

Align quickbrush dabs to outline.

For some reason, the quickbrush dabs tend .5 towards the lower right, so
we subtract that from the brush position to align them to the cursor.
This also increase the cursor size, as it was not including the extra
pixel for antialiasing.

M  +3    -2    plugins/paintops/roundmarker/kis_roundmarkerop.cpp
M  +2    -1    plugins/paintops/roundmarker/kis_roundmarkerop_settings.cpp

https://invent.kde.org/graphics/krita/commit/a8716a2573d098e0103305e4bfaf0824647844a5
Comment 3 wolthera 2020-08-15 09:14:08 UTC
Git commit 688e664180848ca14b584c1e7149121ce39f674b by Wolthera van Hövell tot Westerflier.
Committed on 15/08/2020 at 09:13.
Pushed by woltherav into branch 'krita/4.3'.

Align quickbrush dabs to outline.

For some reason, the quickbrush dabs tend .5 towards the lower right, so
we subtract that from the brush position to align them to the cursor.
This also increase the cursor size, as it was not including the extra
pixel for antialiasing.

M  +3    -2    plugins/paintops/roundmarker/kis_roundmarkerop.cpp
M  +2    -1    plugins/paintops/roundmarker/kis_roundmarkerop_settings.cpp

https://invent.kde.org/graphics/krita/commit/688e664180848ca14b584c1e7149121ce39f674b