Bug 407868

Summary: Wrong selection display of outlines : strange triangles on the top the selection "holes".
Product: [Applications] krita Reporter: Melcx <melcx>
Component: Tools/SelectionAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: minor CC: dimula73, ghevan
Priority: NOR    
Version: 4.1.7   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Wrongly displayed selection.

Description Melcx 2019-05-23 13:58:43 UTC
Created attachment 120268 [details]
Wrongly displayed selection.

SUMMARY
Sometimes, selection outlines is wrongly displayed : strange triangles appear on the top the selection "holes".

STEPS TO REPRODUCE
1. On a white layer, draw some random shapes
2. Use the "Contiguous Selection Tool" on the background

OBSERVED RESULT
Depending on the selection shape, I can see added triangle outlines on the top of the drawn shapes. They go 1px higher than the real selection (wrong display of selection).

EXPECTED RESULT
Correct shape outline.

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Tested with "OpenGL" and "DirectX 11 via ANGLE" renderers.
Tested with NVidia 870M and Intel integrated graphic chipset.
Comment 1 vanyossi 2019-05-31 03:01:52 UTC
This is bug is cosmetic, the selection is done correctly (thats a good thing). Selection has 2 modes for previewing, Marching ants and Mask. See more info here https://docs.krita.org/en/user_manual/selections.html#display-modes so you can check with th emask option the selection was done properly.

I confirm this minor glitch.
Comment 2 Dmitry Kazakov 2020-05-08 23:19:55 UTC
Git commit a126dca4f7084c6625f1c3a315c328729b9e8b69 by Dmitry Kazakov.
Committed on 08/05/2020 at 23:19.
Pushed by dkazakov into branch 'master'.

Fix artifacts in outlines of small selections

I had to rewrite the outline generation algorithm to fix three issues:

1) The start point should not be duplicated
2) End point should be the same as the start point
3) There should be no artifacts on "internal selection holes"

M  +41   -35   libs/image/kis_outline_generator.cpp
M  +1    -1    libs/image/kis_outline_generator.h
M  +213  -1    libs/image/tests/kis_pixel_selection_test.cpp
M  +2    -0    libs/image/tests/kis_pixel_selection_test.h

https://invent.kde.org/kde/krita/commit/a126dca4f7084c6625f1c3a315c328729b9e8b69
Comment 3 Dmitry Kazakov 2020-05-08 23:24:34 UTC
Git commit 667389cf9975060a3f9ef977d7ea12e64bb733f2 by Dmitry Kazakov.
Committed on 08/05/2020 at 23:20.
Pushed by dkazakov into branch 'krita/4.3'.

Fix artifacts in outlines of small selections

I had to rewrite the outline generation algorithm to fix three issues:

1) The start point should not be duplicated
2) End point should be the same as the start point
3) There should be no artifacts on "internal selection holes"

M  +41   -35   libs/image/kis_outline_generator.cpp
M  +1    -1    libs/image/kis_outline_generator.h
M  +213  -1    libs/image/tests/kis_pixel_selection_test.cpp
M  +2    -0    libs/image/tests/kis_pixel_selection_test.h

https://invent.kde.org/kde/krita/commit/667389cf9975060a3f9ef977d7ea12e64bb733f2