Bug 307769

Summary: brush outline does not represent brush and leaves artefacts
Product: [Applications] krita Reporter: Tom Hall <tahall256>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla, sven.langkamp
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Screenshot showing artefacts and inaccuracies

Description Tom Hall 2012-10-03 12:37:08 UTC
See attached screenshot. The brush itself works (red line, doesn't taper). However, the brush outline gets smaller as it moves away from the top left hand corner of the image. It also leaves trails of previous brush outlines (failing to update canvas when brush moves away? wrong bounding rect updated?)

Reproducible: Always

Steps to Reproduce:
1. Select a brush which has constant size (It doesn't have to have constant size to produce the bug, but it's easier to see that the outline is wrong when you know it shouldn't change in size).
2. Hover over different areas of the canvas.
Actual Results:  
Brush leaves previous brush outlines visible.
Brush outline is incorrect over some parts of the canvas.

Expected Results:  
Previous brush outlines should disappear when the brush moves.
Brush outline correctly approximates the size and shape of the brush.

I think this may have appeared with the merging of the krita-vc-langkamp branch, but I'm not certain.
Comment 1 Tom Hall 2012-10-03 12:38:03 UTC
Created attachment 74315 [details]
Screenshot showing artefacts and inaccuracies
Comment 2 Tom Hall 2012-10-03 14:17:32 UTC
Additional info: I have Vc installed and cmake found it when building, so I assume krita is now making use of it.
Comment 3 Sven Langkamp 2012-10-03 19:00:23 UTC
I don't see that here, even with vc. What are the exact setting of the brush and zoom level?
Comment 4 Tom Hall 2012-10-03 23:33:28 UTC
Brush settings don't seem to matter. I've done some more experimenting, and it seems it's actually the "Use same aspect as pixels" button that's significant, but it's not simply a case of whether it's on or off. It appears that the bug is triggered if the button is toggled after changing zoom level, so in the following sequence:
Zoom out -> no artefacts
Turn on same aspect -> artefacts (+ other stuff described above)
Zoom out -> no artefacts
Turn off same aspect -> artefacts etc.

In light of this, it possible Vc is a red herring and I've just never fiddled with the "Use same aspect as pixels" button before now.
Comment 5 Halla Rempt 2012-10-05 08:37:02 UTC
Weird, if I toggle that button the outline actually isn't painted at all if the button is off!
Comment 6 Dmitry Kazakov 2012-10-09 12:32:38 UTC
Git commit 24734db753d8d5347f6ac398bf5d2e657cdcc25f by Dmitry Kazakov.
Committed on 09/10/2012 at 14:32.
Pushed by dkazakov into branch 'master'.

Fixed switching between the Aspect modes

The change of the resolution should happen in the setZoom, otherwise
it will not know the old values of the document rect and zoom.

M  +2    -2    krita/ui/kis_view2.cpp
M  +9    -5    krita/ui/kis_zoom_manager.cc
M  +21   -2    libs/widgets/KoZoomController.cpp
M  +16   -1    libs/widgets/KoZoomController.h

http://commits.kde.org/calligra/24734db753d8d5347f6ac398bf5d2e657cdcc25f
Comment 7 Jarosław Staniek 2012-10-31 11:26:38 UTC
Git commit 33125a19e69b4414c924496b0d62518d536e3b2e by Jaroslaw Staniek, on behalf of Dmitry Kazakov.
Committed on 09/10/2012 at 14:32.
Pushed by staniek into branch 'kexi-altertable-staniek'.

Fixed switching between the Aspect modes

The change of the resolution should happen in the setZoom, otherwise
it will not know the old values of the document rect and zoom.

M  +2    -2    krita/ui/kis_view2.cpp
M  +9    -5    krita/ui/kis_zoom_manager.cc
M  +21   -2    libs/widgets/KoZoomController.cpp
M  +16   -1    libs/widgets/KoZoomController.h

http://commits.kde.org/calligra/33125a19e69b4414c924496b0d62518d536e3b2e