[Qgis-developer] Viewport rotation

Sandro Santilli strk at keybit.net
Thu Nov 20 09:40:50 PST 2014


On Thu, Nov 20, 2014 at 11:54:01AM +0100, Sandro Santilli wrote:
> On Thu, Nov 20, 2014 at 09:01:55AM +1100, Nyall Dawson wrote:

> > Ideally, I think this should be supported in the map renderer -
> > QgsMapRendererJob.
> 
> Would that be similar to considering it an additional transformation
> on the input data, like reprojection ?

I've tried this approach, basically adding rotation support to
the QgsMapToPixel class. With such support I can see the map
rotated as requested while "horizontal" labels remain horizontal.
But "parallel" labels are completely off (and pretty funny).

> > Currently the composer supports rotated maps, but it's a bit of a
> > hack. It's really just rendering the map and then rotating the result.
> > As a result all labels, symbology, etc also get rotated, which isn't
> > ideal.

For "parallel" labels, it is actually good that they rotate with the map.
I guess there would need to be some rotation knowledge at various levels
for things to be flexible enough.

--strk;

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


More information about the Qgis-developer mailing list