Thx Nyall, I was just trying QgsMapRendererSequentialJob and it works fine. I was taking the code from an old plugin from mine...
giovanni Il 2 mar 2017 22:46, "Nyall Dawson" <nyall.daw...@gmail.com> ha scritto: On 3 March 2017 at 07:11, G. Allegri <gioha...@gmail.com> wrote: > Looking into QgsMapRenderer it looks like rotation is never used during > rendering. It's not passed in any way to the layers during the rendering > phase. > > I guess it's used (in other ways) only for canvas rendering... > > How should a renderer rotate contents during image rendering? Should I apply > the rotation directly on the QPainter (painter.rotate())? > QgsMapRenderer is very old and was removed in QGIS 3.0. Its replacement is QgsMapRendererJob with use of QgsMapSettings for the map parameters. If you use QgsMapSettings with setRotation this should work without issue. Nyall
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer