Bug 326011 - Brush with pattern works on uneven brush-sizes and doesn't work on even brush sizes. With a tablet, with a mouse it's inverted.
Summary: Brush with pattern works on uneven brush-sizes and doesn't work on even brush...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 2.8 Pre-Alpha
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 15:54 UTC by wolthera
Modified: 2013-10-15 09:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Behaviours shown, blue is tablet, black is mouse. (163.67 KB, image/png)
2013-10-14 15:54 UTC, wolthera
Details
The pixel brush preset. (4.11 KB, application/octet-stream)
2013-10-14 15:57 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2013-10-14 15:54:02 UTC
I've been using the pixel-dither patterns in combination with a hard-edged brush for pixel-art purposes. However, I've noticed that the pattern doesn't come up on even-brush sizes but does on uneven brush-sizes.

More peculiarly, it works that way with my tablet. On the mouse the behaviour is inverted: even brushsizes show the pattern, uneven ones don't.

I'll include an image and brushes in a bit.

Semi-related: Using pressure to change size results in unpatterned spots due to this.

Reproducible: Always
Comment 1 wolthera 2013-10-14 15:54:44 UTC
Created attachment 82846 [details]
Behaviours shown, blue is tablet, black is mouse.
Comment 2 wolthera 2013-10-14 15:57:14 UTC
Created attachment 82847 [details]
The pixel brush preset.
Comment 3 wolthera 2013-10-14 16:18:23 UTC
Might very well be related to this bug: https://bugs.kde.org/show_bug.cgi?id=319130 Though that bug is more obvious on

I think what is happening is that Krita draws the pattern based on the size of the brush rather than a 'fixed-size', like say, the canvas value. For me, this means that the origin of the pattern is visibly different for 1px difference. For the related bug, it's only visible different for larger-size differences.
Comment 4 Dmitry Kazakov 2013-10-15 07:43:55 UTC
Hi, wolthera!

Thanks for your report, I will fix this bug soon.
Comment 5 Dmitry Kazakov 2013-10-15 09:04:58 UTC
Git commit 2352dfa1079930fa743172654d01ca8619d4b35c by Dmitry Kazakov.
Committed on 15/10/2013 at 09:04.
Pushed by dkazakov into branch 'krita-wintab-kazakov'.

Fixed offset of the texture for the brushes which might have subpixel precision

Activation of the subpixel precision caused offset for the brushes with
even sizes (due to some rounding). Now the offset is directly calculated
directly basing on the topLeft corner of the dab, which eliminates the
subpixel precision influence.
Related: bug 319130

M  +4    -3    krita/plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp
M  +1    -1    krita/plugins/paintops/colorsmudge/kis_colorsmudgeop.h
M  +1    -0    krita/plugins/paintops/defaultpaintops/brush/kis_brushop.cpp
M  +1    -1    krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +7    -6    krita/plugins/paintops/filterop/kis_filterop.cpp
M  +2    -1    krita/plugins/paintops/hatching/kis_hatching_paintop.cpp
M  +14   -7    krita/plugins/paintops/libpaintop/kis_dab_cache.cpp
M  +7    -1    krita/plugins/paintops/libpaintop/kis_dab_cache.h
M  +0    -3    krita/plugins/paintops/libpaintop/kis_texture_option.cpp
M  +1    -1    krita/plugins/paintops/sketch/kis_sketch_paintop.cpp
A  +-    --    krita/ui/tests/data/auto_textured_17.kpp
A  +-    --    krita/ui/tests/data/auto_textured_38.kpp
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_incremental_cancelled_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_incremental_cancelled_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_incremental_finished_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_incremental_finished_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_indirect_cancelled_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_indirect_cancelled_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_indirect_finished_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_17.kpp_indirect_finished_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_incremental_cancelled_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_incremental_cancelled_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_incremental_finished_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_incremental_finished_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_indirect_cancelled_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_indirect_cancelled_internal.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_indirect_finished_external.png
A  +-    --    krita/ui/tests/data/freehand/freehand_auto_textured_38.kpp_indirect_finished_internal.png
M  +12   -0    krita/ui/tests/freehand_stroke_test.cpp
M  +2    -0    krita/ui/tests/freehand_stroke_test.h

http://commits.kde.org/calligra/2352dfa1079930fa743172654d01ca8619d4b35c