Bug 383894 - ALT+Color Picker fails to pick correct color in Wrap Around mode
Summary: ALT+Color Picker fails to pick correct color in Wrap Around mode
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: 3.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: https://youtu.be/ch4bcIkw71o
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-23 09:06 UTC by sogun
Modified: 2017-11-30 16:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sogun 2017-08-23 09:06:58 UTC
ALT+Color Picker fails pick color from screen exactly above the pixel position, where it is held in Wrap around mode. 

VIDEO DEMONSTRATION OF THE BUG:

https://youtu.be/ch4bcIkw71o

Reproduce:

1. 32x32 pixel art image, wrapped around, 

2. zooming in and panning in the wrap-around environment 

3. painting pixels panning elsewhere, zooming out to see the work, zooming back in, panning around, locating a place that needs more painting

4. trying to pick any color with ALT+Color Picker from pixels already painted on the texture --> with a pixel brush active, hold ALT + hold down left mouse / pen and slide your mouse/pen on the canvas and see how the ALT+Color Picker lost accuracy and picks the wrong color under the cursor. 

5. If you slide around with the picker, you'll see that FOR THE COLOR PICKER's COLOR DETECTION DISPLAY the whole texture is offset a couple pixels ---> you'll have to go couple pixels away from the original on screen in any direction for the color picker to finally find your the color that you wanted to pick on screen.





around. You'll see in 5~~20 secs the ALT+Color Picker only finds the
Comment 1 sogun 2017-08-23 09:16:13 UTC
You'll see in 5~~20 seconds of working = zooming in out, panning around in the wrap-around environment and picking color and painting that  the ALT+Color Picker looses is exact pixel accuracy and its screen-coordinate detection SLIDES OFFSET.   

It still finds the color, but after loosing TRACK of the exact pixel-on-screen coordinates in wrap around mode, it becomes a blind-man game, a mystery where exactly the ALT+Color Picker thinks the pixels on the painted texture are...
Comment 2 Alvin Wong 2017-11-18 14:42:49 UTC
Confirmed. It really only happens with negative coordinates, which is probably a rounding error like Bug 367943.
Comment 3 Alvin Wong 2017-11-30 16:51:36 UTC
Git commit 58c3af947fbf89c0b5a5fd5d410d7c348d6194ed by Alvin Wong.
Committed on 30/11/2017 at 16:31.
Pushed by alvinwong into branch 'master'.

Fix rounding in wrap around mode for some operations

This fixes the rounding error for negative coordinates in wrap around
mode for the colour picker, fill tool and continuous selection tool.
Differential Revision: https://phabricator.kde.org/D8894

M  +2    -2    libs/image/kis_image.cc
M  +2    -2    libs/image/kis_image.h
M  +1    -1    libs/ui/kis_statusbar.cc
M  +2    -2    libs/ui/tool/kis_tool.cc
M  +2    -2    libs/ui/tool/kis_tool.h
M  +1    -1    libs/ui/tool/kis_tool_paint.cc
M  +2    -2    plugins/tools/basictools/kis_tool_colorpicker.cc
M  +1    -1    plugins/tools/basictools/kis_tool_fill.cc
M  +1    -1    plugins/tools/selectiontools/kis_tool_select_contiguous.cc

https://commits.kde.org/krita/58c3af947fbf89c0b5a5fd5d410d7c348d6194ed