Bug 389034 - Incorrect behavior when painting beyond the top or left borders of the canvas
Summary: Incorrect behavior when painting beyond the top or left borders of the canvas
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-01-16 03:51 UTC by Nicholas LaPointe
Modified: 2018-02-06 16:48 UTC (History)
2 users (show)

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


Attachments
Example image (58.44 KB, image/png)
2018-01-16 03:51 UTC, Nicholas LaPointe
Details
(Video example) (531.54 KB, video/mp4)
2018-01-16 11:08 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas LaPointe 2018-01-16 03:51:03 UTC
Created attachment 109899 [details]
Example image

Painting beyond the top or left borders of the canvas appears to produce a dashed version of what was drawn, with a 128px spacing.
This seems to have broken at or around the time that multithreaded brushes were added.

In the attached image, I drew lines that started on the canvas and ended outside of it, then moved the layer down and to the right.
Comment 1 mvowada 2018-01-16 11:08:17 UTC
Created attachment 109905 [details]
(Video example)

Yes, I can reproduce this bug on Ubuntu 14.04 with Krita 4.0.0-beta1.1 (OpenGL was enabled) (see video)
Comment 2 Halla Rempt 2018-01-17 11:02:30 UTC
One for Dmitry then. It is a regression, but I would not classify it as a release blocker.
Comment 3 Dmitry Kazakov 2018-02-06 14:05:08 UTC
Confirm, I can reproduce. It seem to be related to the new multithreaded pixel brush and the fact that the painting rectangles have negative offset
Comment 4 Dmitry Kazakov 2018-02-06 16:48:41 UTC
Git commit 18b549c1ee549b4be6182e368a42750adf56cce8 by Dmitry Kazakov.
Committed on 06/02/2018 at 16:48.
Pushed by dkazakov into branch 'master'.

Fix division in KisAlgebra2D::splitRectIntoPatches()

Here we should round the division result towards negative infinity
instead of zero point.

M  +19   -0    libs/global/kis_algebra_2d.h
M  +1    -1    libs/image/brushengine/kis_paintop_utils.cpp
M  +1    -1    libs/image/kis_painter.cc
M  +7    -4    libs/image/krita_utils.cpp
M  +23   -0    libs/image/tests/kis_algebra_2d_test.cpp
M  +2    -0    libs/image/tests/kis_algebra_2d_test.h

https://commits.kde.org/krita/18b549c1ee549b4be6182e368a42750adf56cce8