Bug 439188

Summary: Pixel brush and 45 degree lines with line tool creates weird bumps
Product: [Applications] krita Reporter: Alvin Wong <alvin>
Component: ToolsAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: griffinvalley, info
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: unspecified   
OS: Unspecified   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: example of lines with bumps

Description Alvin Wong 2021-06-26 15:29:30 UTC
Created attachment 139674 [details]
example of lines with bumps

SUMMARY

When drawing 45 degree lines with the line tool and the "u) Pixel Art" brush, some lines have weird bumps on them.


STEPS TO REPRODUCE
1. Create a 400 x 400 px image
2. Select line tool and the "u) Pixel Art" brush, set brush size to 4 px
3. Draw 45 degree diagonal lines by holding shift


OBSERVED RESULT

Some lines have weird bumps.


EXPECTED RESULT

These weird bumps shouldn't appear.


ADDITIONAL INFORMATION

Filed for commit c75e336c15
Comment 1 Ralek Kolemios 2021-06-26 17:22:40 UTC
Can confirm this happens on Windows 10 4.4.4-alpha (git cc5d52c)

This bug isn't specific to the line tool, it's rather a quirk of how the brush engine works under the hood. You can try to lower the 'spacing' in the brush tools, but so long as the brush 'updates' are delegated by distance rather than at the pixel level, I believe pixel brushes will always suffer from this unless a pixel-art-specific brush engine is created.
Comment 2 wolthera 2021-09-09 13:25:34 UTC
No idea how we'd solve this though.
Comment 3 Ralek Kolemios 2021-09-11 19:08:58 UTC
(In reply to wolthera from comment #2)

The only solution I can come up with is a new pixel art brush engine.

Each brush position update, calculate if affected pixel's 'center' points are within the circle of the brush, if so, color it in. If not, don't.

I'd image the extremely simplified calculations would allow the spacing to be not only extremely small, but possibly even interpolated even further between updates ensuring there's no gaps like what show up currently.
Comment 4 Dmitry Kazakov 2024-08-22 16:39:38 UTC
Remove triaged keyword from CONFIRMED bugs