[Qgis-developer] Replacing Extent with Center in QgsMapSettings (for rotation)

Sandro Santilli strk at keybit.net
Sat Nov 29 11:03:13 PST 2014


On Fri, Nov 28, 2014 at 10:58:01AM +0100, Marco Hugentobler wrote:
> On 28.11.2014 10:41, Sandro Santilli wrote:
> >By "scale" I mean "resolution", that is how many source units fit
> >in a pixel.
> I see, then it makes sense to go with scale / resolution.

Today I've pushed new code to fix panning, zooming and center-setting
tools with fully-visible rotated maps.

While doing that I found a meaning for the current simple "extent"
concept. What's currently called "extent" basically encodes _center_
and _resolution_ of the map. That's what we add in "bookmarks".

Part of my recent commits have been adding a method to explicitly
set the center, so that at least the caller is guaranteed that scale
won't change. Setting extent still has the possibility to change the
scale, for the finding above.

I haven't tested it yet, but I suppose the zoom tool is still funny
while the map is rotated (rubberband is not a rectangle). Also, labels
placement needs to be improved with rotated map.

Tests welcome!
As usual, git remote is git://github.com/strk/QGIS.git
and branch is "rotation"

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  


More information about the Qgis-developer mailing list