Bug 430988

Summary: Reference image render bug when resizing under high DPI
Product: [Applications] krita Reporter: Alvin Wong <alvin>
Component: OpenGL CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: 4.4.2-beta2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: Screen capture of the problem
Test file with a reference image

Description Alvin Wong 2020-12-30 20:47:26 UTC
SUMMARY

When resizing a reference image, some parts are not redrawn properly.


STEPS TO REPRODUCE

1. Add a small reference image into the document
2. Enlarge the reference image by using the resize handle on the bottom-left


OBSERVED RESULT

Some of the left and bottom area of the reference image does not get redrawn until the reference image reaches certain sizes.


EXPECTED RESULT

Issue should not be present.


SOFTWARE/OS VERSIONS
Windows: 1903 build 18362.1139


ADDITIONAL INFORMATION

Using ANGLE, have not tested any other canvas render methods.

The screen scale factor is 2x.
Comment 1 Tiar 2021-03-11 14:26:31 UTC
Created attachment 136585 [details]
Screen capture of the problem

I'm not sure if this is the same thing but I'm experiencing something similar on master on Linux Mint (screen scale = 2x).

When I'm moving a reference image, it sometimes gets cropped with transparency on the left side and on the bottom. I guess it might be because somewhere some calculations regarding the size forget about high dpi?

@Alvin is that how you experience it, too? (Check the video).
Comment 2 Halla Rempt 2021-03-11 14:33:21 UTC
I think we can only solve this by porting our canvas decorations away from QPainter: it's a problem in the OpenGL QPainter engine.
Comment 3 Tiar 2021-03-11 14:34:46 UTC
Created attachment 136586 [details]
Test file with a reference image

Reference image comes from pexels.com
Comment 4 Alvin Wong 2021-03-11 22:43:43 UTC
(In reply to Tiar from comment #1)
> Created attachment 136585 [details]
> Screen capture of the problem
> 
> I'm not sure if this is the same thing but I'm experiencing something
> similar on master on Linux Mint (screen scale = 2x).
> 
> When I'm moving a reference image, it sometimes gets cropped with
> transparency on the left side and on the bottom. I guess it might be because
> somewhere some calculations regarding the size forget about high dpi?
> 
> @Alvin is that how you experience it, too? (Check the video).

Yes, this is the same thing as I have been seeing.
Comment 5 Alvin Wong 2022-02-19 12:28:25 UTC
Git commit 0d1eef463ca945b41eda156e4214fe4151f510d4 by Alvin Wong.
Committed on 19/02/2022 at 12:27.
Pushed by alvinwong into branch 'master'.

Fix reference image update on resizing in high DPI

M  +1    -1    libs/ui/KisReferenceImagesDecoration.cpp

https://invent.kde.org/graphics/krita/commit/0d1eef463ca945b41eda156e4214fe4151f510d4
Comment 6 Alvin Wong 2022-02-19 12:29:08 UTC
Git commit 25c1ec39738e28d0dd0a2f038ec9609569c378ab by Alvin Wong.
Committed on 19/02/2022 at 12:28.
Pushed by alvinwong into branch 'krita/5.0'.

Fix reference image update on resizing in high DPI
(cherry picked from commit 0d1eef463ca945b41eda156e4214fe4151f510d4)

M  +1    -1    libs/ui/KisReferenceImagesDecoration.cpp

https://invent.kde.org/graphics/krita/commit/25c1ec39738e28d0dd0a2f038ec9609569c378ab