Created attachment 114989 [details] Example of a 2px stroke showing up as 3px The "Stroke" tool in the Layer Styles window does not apply the correct value onto the image. For example, shapes in a layer with a style of a 2px stroke will actually come out as 3px on the image; strokes with a 3px value will show up as 5px on the image, and strokes with a value of 4px will show up as 8px on the image. The difference seems minor, but is very noticeable from afar. This bug should be triggered by creating a new layer, making any shape using a color or brush, applying a layer style, and zooming in to see if the stroke is correct. I use Arch Linux to use Krita; I tested this on a different device (Windows 10) using the most recent version of Krita, and the same problem occurred; after, I used an older version of Krita and it worked correctly; the amount of pixels matched the value I put in. Unfortunately, I do not remember when I first encountered the bug, as it has been several months before I began to see if anyone else had this bug, but I am extremely confident that it occurs on versions past 4.0.4.
Created attachment 114990 [details] Example of a 3px stroke showing up as 5px
Created attachment 114991 [details] Example of a 4px stroke showing up as 8px
krita-4.2.0-pre-alpha-127857b-x86_64.appimage confirming This does not happen with stroke position set to 'center'. It seems to double the value when set to 'outside'. Don't know how to test 'inside'. Happens with or without aliasing.
Git commit 227782b46d72d82d4aeb6e016f62d81ea3c0ab57 by Dmitry Kazakov. Committed on 02/10/2019 at 19:41. Pushed by dkazakov into branch 'master'. Fix "Stroke" Layer Style width not to be doubled Stroke still doesn't generate exactly the same result as in PS, because in PS it uses a bit different way of blending (it removes the part of the original layer, or just uses COMPOSITE_COPY). M +2 -2 libs/image/kis_gaussian_kernel.cpp M +13 -6 libs/image/layerstyles/kis_ls_stroke_filter.cpp https://invent.kde.org/kde/krita/commit/227782b46d72d82d4aeb6e016f62d81ea3c0ab57
Git commit d3f2c8f26517d0d08cd10c2c9e939cc0a7a0a553 by Dmitry Kazakov. Committed on 03/10/2019 at 12:49. Pushed by dkazakov into branch 'master'. Fix Stroke layer style to be applies directly onto backround In ASL imlementation Stroke is applied to the background, not to the layer itself. M +1 -0 libs/image/CMakeLists.txt A +46 -0 libs/image/layerstyles/KisLayerStyleKnockoutBlower.cpp [License: GPL (v2+)] A +40 -0 libs/image/layerstyles/KisLayerStyleKnockoutBlower.h [License: GPL (v2+)] M +2 -0 libs/image/layerstyles/kis_layer_style_filter.h M +8 -0 libs/image/layerstyles/kis_layer_style_filter_projection_plane.cpp M +3 -0 libs/image/layerstyles/kis_layer_style_filter_projection_plane.h M +65 -22 libs/image/layerstyles/kis_layer_style_projection_plane.cpp M +5 -3 libs/image/layerstyles/kis_ls_bevel_emboss_filter.cpp M +1 -0 libs/image/layerstyles/kis_ls_bevel_emboss_filter.h M +2 -0 libs/image/layerstyles/kis_ls_drop_shadow_filter.cpp M +1 -0 libs/image/layerstyles/kis_ls_drop_shadow_filter.h M +2 -0 libs/image/layerstyles/kis_ls_overlay_filter.cpp M +1 -0 libs/image/layerstyles/kis_ls_overlay_filter.h M +2 -0 libs/image/layerstyles/kis_ls_satin_filter.cpp M +1 -0 libs/image/layerstyles/kis_ls_satin_filter.h M +14 -12 libs/image/layerstyles/kis_ls_stroke_filter.cpp M +2 -0 libs/image/layerstyles/kis_ls_stroke_filter.h https://invent.kde.org/kde/krita/commit/d3f2c8f26517d0d08cd10c2c9e939cc0a7a0a553
The bug is not fixed in master :)