qwat / QWAT

TEKSI Water module (project QWAT) - QGIS project
https://www.teksi.ch
GNU General Public License v2.0
58 stars 31 forks source link

slider to set DPI #129

Closed vpicavet closed 8 years ago

vpicavet commented 8 years ago

We have some use cases for changing the DPI dynamically in the canvas :

vpicavet commented 8 years ago

The main use case is to be able to see the canvas with an image zoom ( as opposed to a geographical zoom). DPI slider for canvas is a way to achieve this, and can be really useful for high-resolution screens.

Another option could be a magnifier tool.

mhugo commented 8 years ago

QT has probably a way to handle large displays and sets the DPI, but I cannot find it ... Alternatively we can add a slider to zoom the canvas. Do we want everything to be zoomed ? Or only texts / labels / diagrams ?

3nids commented 8 years ago

the idea is to magnify the whole map as if we were using a magnifier

mhugo commented 8 years ago

@3nids Is it a pixel-based zoom that is needed ? Or a "real" zoom where vector features (and possibly symbology) would be zoomed ? I cannot see the added value of a pure pixel-based zoom compared to say ... the integrated "magnifier" tool of Windows for instance.

3nids commented 8 years ago

yes it would a pixel-based zoom on the map canvas only. I don't know the magnifier on windows, but as far as I see it, the advantage is that the zoom will be applied strictly and only on the map canvas. One use case is the manual placement of labels. We have very small labels and it is very painful for the eyes to work at 1:1. Being able to have a 2x zoom would be very helpful. Does it make sense to you?

mhugo commented 8 years ago

Ok. So you need a zoom that follows the mouse and let you do other actions (label placement for instance). Would it be wrong if it is a vector-based zoom ? (no "big pixels" when you zoom)

vpicavet commented 8 years ago

If we need to do actions while having the zoom, the DPI slider seems better. Last remaining question would be pixel-based versus vector-based zoom. And in case of pixel based, do we want pixelized zoom ( nearest neighbour ) or interpolation ( e.g. bilinear )

pblottiere commented 8 years ago

If we need to do actions while having the zoom, the DPI slider seems better.

:+1:

And in case of pixel based, do we want pixelized zoom ( nearest neighbour ) or interpolation ( e.g. bilinear )

We could provide to the user a simple way to set the desired method.

3nids commented 8 years ago

I thought at beginning that the whole map canvas would be zoomed. Although, a window around the map also has it advantages, and most important might avoid confusions between the two ways to "zoom". I would go for interpolation without adding any option. The cost might not be that bad no?

pblottiere commented 8 years ago

PR submitted : https://github.com/qgis/QGIS/pull/3009

3nids commented 8 years ago

thanks. will you go for DPI rather than pixel-based?

pblottiere commented 8 years ago

@3nids Indeed, it seems that a DPI magnifier is what they REALLY want. However, it's not the initial request and when I took a look to mapsettings, I noticed some strange behaviours with DPI. So, I need more time than the time initially allocated to this item. Do you agree?

3nids commented 8 years ago

Well this not m decision to take, but from the discussion there doesn't seem to be much of a choice. So, for me yes, this is the way to go.

vpicavet commented 8 years ago

Merged in master. Closing ?