Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set canvas rendering dpi from window dpi #3847

Closed
wants to merge 1 commit into from

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Dec 8, 2016

@elpaso I think you have a high dpi device to verify the patch?

@elpaso
Copy link
Contributor

elpaso commented Dec 10, 2016

@m-kuhn sure, I'll check it ASAP, what exactly should I test?

@m-kuhn
Copy link
Member Author

m-kuhn commented Dec 12, 2016

It doesn't work apparently qgis/homebrew-qgisdev#5 (comment). I think there's something else required to make it work, but don't know what...

@m-kuhn
Copy link
Member Author

m-kuhn commented Dec 22, 2016

@elpaso possibly setting the env variable QT_AUTO_SCREEN_SCALE_FACTOR=1 http://doc.qt.io/qt-5/qt.html and check what happens with/without this patch... I guess it just needs someone with appropriate hardware to play around a bit :)

@elpaso
Copy link
Contributor

elpaso commented Dec 23, 2016

@m-kuhn I can test it only on a retina Macbook pro running Kubuntu xenial (I cannot build on MacOS, sorry and my other 4k machine has only a Qt4 toolchain), but what exactly does not work in current master and it's supposed to be fixed with your patch?

I need the procedure for what to test.

The map canvas DPIs?
Do you I need a particular symbology/labels to test with?
Should I try to save and export the canvas from master and with your patch and compare the output?

I'll have time to test it right after christmas.

@m-kuhn
Copy link
Member Author

m-kuhn commented Dec 24, 2016

I don't know anything more than is written in here: qgis/homebrew-qgisdev#5

I assume it's a matter of making sure that

  1. the canvas graphicsscene draws on every single pixel (and doesn't use some "backwards-compatible" upscaling logic)
  2. the mapcanvasmap item really draws in the appropriate resolution (so fonts and symbology is not too small)

I'm sorry I really cannot be of anymore help.

@elpaso
Copy link
Contributor

elpaso commented Dec 27, 2016

I've checked this PR on kubuntu xenial QT 5.5.1 on a retina screen 220dpi and makes no difference: the mDPI is already set at 220, so that line does nothing.
The canvas is rendered correctly @220 dpi, unless you set QT_DEVICE_PIXEL_RATIO=2 (deprecated on 5.6), that makes pixels doubled (i.e. prints 4 pixels groups of equal color).

@m-kuhn
Copy link
Member Author

m-kuhn commented Dec 27, 2016

Thanks. So it's already rendered in HighDpi. In this case it's maybe a mac issue or only happens in newer Qt versions, but unlikely that this patch fixes anything.

@m-kuhn m-kuhn closed this Dec 27, 2016
nyalldawson pushed a commit that referenced this pull request Dec 21, 2020
nyalldawson pushed a commit that referenced this pull request Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants