Bug 321536 - Transformation tool glitch with high resolution images
Summary: Transformation tool glitch with high resolution images
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Tools/Transform (show other bugs)
Version: 2.8 Pre-Alpha
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-23 17:11 UTC by Tyson Tan
Modified: 2013-08-28 03:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The transformation tool displaying a layer with offset (240.36 KB, image/png)
2013-06-23 17:22 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2013-06-23 17:11:48 UTC
When working with high resolution images, Krita's transformation tool displays a layer with an offset in position.

Reproducible: Sometimes

Steps to Reproduce:
1. Create a A4@600dpi blank document.
2. Create a new layer, fill it with pure green.
3. Create a new layer above the green layer and fill it with pure red.
4. Use the selection tool to select a large area of the red layer.
5. Cut the selected area.
6. Create a new layer above the red layer.
7. Paste.
8. Select transformation tool from the toolbox.
9. Click on the pasted layer.
10. The transforming zone shows the image with a great position offset.
Actual Results:  
The transforming zone shows the image with a great position offset. One simply can't preview the transformation result with such offset. The handle still works and the applied result is also correct.

Expected Results:  
The transforming zone should be displayed without any offset.

This bug only occur when you are working with some high resolution images (like A4@600dpi) but not with some smaller ones (like 2550x3300).

If you cut a part of an A4@600dpi image and paste it into a 2550x3300 image as a new layer, the pasted layer will also be displayed with the same offset when you are trying to transform it, even it is actually smaller than 2550x3300.

This bug only occur when you use the transformation tool to work with the whole layer (1. Click transformation tool -> 2. Click the layer). If you select the area using the selection tool first, there will be no undesirable offset. 

I can't remember something like that happened in Krita 2.6.x.
Comment 1 Tyson Tan 2013-06-23 17:22:10 UTC
Created attachment 80737 [details]
The transformation tool displaying a layer with offset
Comment 2 Halla Rempt 2013-06-24 06:40:07 UTC
Hi Tyson,

thanks for the report! I can confirm the issue. It's important to deselect first, I've found, but then I can easily reproduce.
Comment 3 Tyson Tan 2013-06-24 08:42:27 UTC
Oops, totally forgot the deselecting step. Sorry! XD
Comment 4 Dmitry Kazakov 2013-08-08 20:40:41 UTC
Might be somehow related to the absence of QRect.normalized() calls somewhere/
Comment 5 Dmitry Kazakov 2013-08-26 20:20:34 UTC
Git commit 0555fa3838fe94b085f62a101bf9048c1726f409 by Dmitry Kazakov.
Committed on 26/08/2013 at 20:20.
Pushed by dkazakov into branch 'master'.

Fixed an offset bug when creating a thumbnail of a paint device with offset

The 'translation' seems to be some historical artifact and obviously
not needed anymore.

M  +1    -6    krita/image/kis_paint_device.cc
M  +18   -0    krita/image/tests/kis_paint_device_test.cpp
M  +1    -0    krita/image/tests/kis_paint_device_test.h

http://commits.kde.org/calligra/0555fa3838fe94b085f62a101bf9048c1726f409
Comment 6 Tyson Tan 2013-08-28 03:11:54 UTC
I can confirmed that this bug is now fixed. Thank you very much! :)