[Qgis-developer] Viewport rotation status report

Sandro Santilli strk at keybit.net
Mon Nov 24 08:56:07 PST 2014


I've just pushed new code to the "rotation" branch in my fork [1]
that makes panning and zooming supported at the MapToPixel level.

The MapToPixel class is used by the renderer to transform inputs
to output coordinate space, right after performing geographical
projection transformations.

Rendering wise, the rotation doesn't seem to give nice results.
Arrow decorations and labels are "flattened", and "parallel" labels
are parallel to the original (non-rotated) lines.

[1] https://github.com/strk/qgis/tree/rotation

I suspect there's some redundancy I'm missing out, whereas local classes
have local view on what the canvas extent or scale is. For example I saw
QgsMapRenderer has mExtent and mMapUnitsPerPixel members but also
a mRendererContext which can provide a MapToPixel object having another
copy of that information (extent and scale).

What are these duplications for ? Could we get rid of them to have a
unified configuration for coordinate transforms ?

--strk;

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


More information about the Qgis-developer mailing list