Created attachment 163253 [details] Example of a brush tip and drawing a straight line with it STEPS TO REPRODUCE 1. Create a brush tip such that the center of the bounding box containing all its opaque pixels is clearly different from the geometric center of the brush tip's image. Use this brush tip on a simple brush such as Basic-2 Opacity. 2. Activate preview outline in general->cursor->brush outline shape (3. Activate any cursor in general->cursor->brush cursor icon for better visibility.) 4. Make the brush sufficiently big to see the details of the outline and draw. OBSERVED RESULT The preview of the brush tip is drawn around the center of the set of opaque pixels of the brush tip. Meanwhile, as we draw, individual dabs are (correctly) placed around the center of the full brush tip's image. Thus the preview outline is inconsistent with the dabs. EXPECTED RESULT The preview outline should be centered around the center of the full brush tip's image. SOFTWARE/OS VERSIONS Linux: Ubuntu 22.04 Qt Version: 5.15.7 Appimage ADDITIONAL INFORMATION
Git commit 036427c473a8243ea96f61200c54de8f180380e7 by Dmitry Kazakov, on behalf of Jeff Witthuhn. Committed on 16/09/2025 at 10:30. Pushed by dkazakov into branch 'master'. Fix brush preview outlines being aligned based on incorrect bounding box. The root cause of this bug is that the class `KisOptimizedBrushOutline` does not keep track of the original 'center' of the brush. It instead uses the center of the non-transparent pixels in the brush. The patch just stores the bounds explicitly in `KisOptimizedBrushOutline` to resolve this issue M +1 -1 libs/brush/kis_brush.cpp M +9 -3 libs/image/brushengine/KisOptimizedBrushOutline.cpp M +4 -2 libs/image/brushengine/KisOptimizedBrushOutline.h https://invent.kde.org/graphics/krita/-/commit/036427c473a8243ea96f61200c54de8f180380e7
Git commit 5cdf332b1d44100c5e36d8ba33f4b17a43db8f38 by Dmitry Kazakov. Committed on 16/09/2025 at 10:31. Pushed by dkazakov into branch 'krita/5.2'. Fix brush preview outlines being aligned based on incorrect bounding box. The root cause of this bug is that the class `KisOptimizedBrushOutline` does not keep track of the original 'center' of the brush. It instead uses the center of the non-transparent pixels in the brush. The patch just stores the bounds explicitly in `KisOptimizedBrushOutline` to resolve this issue (cherry picked from commit 036427c473a8243ea96f61200c54de8f180380e7) 46c4af7c Save bounding box of outline for image-based brushes 32b73b36 Fix formatting and add missing include 7ddbc7ab Use const reference for new constructor argument b980bc3c BUG:477164 Update for review comments Co-authored-by: Jeff Witthuhn <jlwitthuhn@gmail.com> M +1 -1 libs/brush/kis_brush.cpp M +9 -3 libs/image/brushengine/KisOptimizedBrushOutline.cpp M +4 -2 libs/image/brushengine/KisOptimizedBrushOutline.h https://invent.kde.org/graphics/krita/-/commit/5cdf332b1d44100c5e36d8ba33f4b17a43db8f38
Git commit 28d8437cdd6379ba3a83ebfb5a36d8345c12ef45 by Dmitry Kazakov. Committed on 16/09/2025 at 10:54. Pushed by dkazakov into branch 'release/5.2.13'. Fix brush preview outlines being aligned based on incorrect bounding box. The root cause of this bug is that the class `KisOptimizedBrushOutline` does not keep track of the original 'center' of the brush. It instead uses the center of the non-transparent pixels in the brush. The patch just stores the bounds explicitly in `KisOptimizedBrushOutline` to resolve this issue (cherry picked from commit 036427c473a8243ea96f61200c54de8f180380e7) 46c4af7c Save bounding box of outline for image-based brushes 32b73b36 Fix formatting and add missing include 7ddbc7ab Use const reference for new constructor argument b980bc3c BUG:477164 Update for review comments Co-authored-by: Jeff Witthuhn <jlwitthuhn@gmail.com> M +1 -1 libs/brush/kis_brush.cpp M +9 -3 libs/image/brushengine/KisOptimizedBrushOutline.cpp M +4 -2 libs/image/brushengine/KisOptimizedBrushOutline.h https://invent.kde.org/graphics/krita/-/commit/28d8437cdd6379ba3a83ebfb5a36d8345c12ef45