You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is mJob->mapSettings().visibleExtent() not ok?
That would be more appropriate as it uses the extent at which the current image is rendered and not the extent of the mapcanvas (which may have changed since the job was scheduled).
Maybe specifying the QgsMapSettings object as parameter to the imageRect method so it can perform the rotation logic on that one instead?
Read the "hack" comment in imageRect. The QgsMapCanvasItem doesn't know how to handle rotated extents, so uses the passed-in rectangle just to encode position and size. If we pass visibleExtent the side would be larger than the actual one when the image is rotated. This has been tested manually/visually, you can try yourself to see what the effects of passing visibleExtent is.
The problem is that it conflicts with a fix I implemented in December because upon repeated quick changing of the map extent (like pinch-zooming) the rendered map extent will be shown at the wrong position.
Currently testing if it works if m2p from the jobs QgsMapSettings is used instead of the one from the map canvas within imageRect.
0 commit comments