Bug 502855

Summary: (Pixel Art) Half mirrored pixel behaves as in between pixel mirror
Product: [Applications] krita Reporter: limticbun
Component: ToolsAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: giga-zoddom
Priority: NOR    
Version First Reported In: 5.2.9   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Clicking and releasing does not cause bug, clicking and moving does.

Description limticbun 2025-04-15 19:14:54 UTC
SUMMARY
Half mirrored pixel behaves as in between mirror, making pixel art asymmetrical if the center point is 1 px wide.

I have documented the bug with a video on the krita forum
https://krita-artists.org/t/mirror-tool-not-working-for-pixel-art/121173/7?u=limticbun

I have noticed similar bug reports but they are not quite same, similar but different.

STEPS TO REPRODUCE
1. Set a position of the mirror tool to be on the pixel, splitting the pixel (canvas i tried on 512x256)
2. draw with a pixel art brush on the split pixel

OBSERVED RESULT
Instead of having drawn one pixel, two pixels are drawn, the additional pixel is drawn to the right.

EXPECTED RESULT
Only 1 pixel is drawn, the one the mirror tool is splitting.

SOFTWARE/OS VERSIONS
Nobara 41 (Based on Fedora 41)
Wayland compositor: Hyprland
Comment 1 Lukas 2025-05-15 13:58:52 UTC
I tested this on Windows 10 Pro and could confirm it. I can also confirm it is the same effect as reported in another bug https://bugs.kde.org/show_bug.cgi?id=499696

For explanation I included a video of it. In short:

If you paint with the mirror tool enabled, the pixel is only placed when releasing the (mouse-)button OR when you start moving the mouse. 
If you do not move the mouse while holding the button, the pixel will be placed correctly.
If you DO move the mouse while painting, the pixel will be placed offset by one pixel to the right or the buttom for the horizontal and vertical mirror tool respectively.

I am not sure if this has anything to do with rounding, since it seems to depend on the type of you give (clicking and releasing VS. clicking and moving).

Hopefully this helps!
Comment 2 Lukas 2025-05-15 13:59:44 UTC
Created attachment 181332 [details]
Clicking and releasing does not cause bug, clicking and moving does.
Comment 3 Lukas 2025-05-15 14:04:04 UTC
(In reply to Lukas from comment #1)
> I tested this on Windows 10 Pro and could confirm it. I can also confirm it
> is the same effect as reported in another bug
> https://bugs.kde.org/show_bug.cgi?id=499696

CORRECTION:
Scratch that connection to the other bug report, I misread the expected vs. observed result. This is probably a different bug.