Bug 419368 - Line Tool: Lines jagged/wiggly on pixel layers
Summary: Line Tool: Lines jagged/wiggly on pixel layers
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (other bugs)
Version First Reported In: 4.2.9
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-03-29 10:56 UTC by Rebecca Breu
Modified: 2020-04-14 06:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Wiggly lines in 4.2.9 (497.50 KB, image/png)
2020-03-29 10:56 UTC, Rebecca Breu
Details
Straight lines in 4.2.8 (515.53 KB, image/png)
2020-03-29 10:56 UTC, Rebecca Breu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rebecca Breu 2020-03-29 10:56:25 UTC
Created attachment 127080 [details]
Wiggly lines in 4.2.9

SUMMARY

When the straight line tool is used on a pixel layer, the lines aren't quite straight, but a little jagged/wiggly.


STEPS TO REPRODUCE
1. Create a new image with a pixel layer
2. Select a thin line art brush
3. Select the line tool
4. Draw lines

OBSERVED RESULT

Lines are a little jagged / wiggly. See screenshots.

EXPECTED RESULT

Straight lines.


This happens only with 4.2.9, not with 4.2.8. A user reported this on reddit first:

https://www.reddit.com/r/krita/comments/fqnjnw/straight_line_tool_bug/
Comment 1 Rebecca Breu 2020-03-29 10:56:50 UTC
Created attachment 127081 [details]
Straight lines in 4.2.8
Comment 2 wolthera 2020-03-29 11:18:42 UTC
Probably related to ivanyossi's 1px fix. I'll assign him.
Comment 3 vanyossi 2020-04-14 06:16:58 UTC
Git commit 76fa0fe0b87c7c83ff8c4c5b527debcd18c7271a by Ivan Yossi.
Committed on 14/04/2020 at 06:16.
Pushed by ivany into branch 'master'.

Adjust line points to DDA only to pixel size brushes

By adjusting to pixel level we loose subpixel precision
and lines appear jagged/curved

M  +1    -2    plugins/tools/basictools/kis_tool_line_helper.cpp

https://invent.kde.org/kde/krita/commit/76fa0fe0b87c7c83ff8c4c5b527debcd18c7271a
Comment 4 vanyossi 2020-04-14 06:18:13 UTC
Git commit e73f8220f6170c56b833f5c932800f7f6acc91c5 by Ivan Yossi.
Committed on 14/04/2020 at 06:17.
Pushed by ivany into branch 'krita/4.3'.

Adjust line points to DDA only to pixel size brushes

By adjusting to pixel level we loose subpixel precision
and lines appear jagged/curved

M  +1    -2    plugins/tools/basictools/kis_tool_line_helper.cpp

https://invent.kde.org/kde/krita/commit/e73f8220f6170c56b833f5c932800f7f6acc91c5