[QGIS-Developer] Exporting point symbols from processing algorithm

C Hamilton adenaculture at gmail.com
Mon Aug 17 08:59:46 PDT 2020


Nyall,

As usual thank you so much for your answers. I have one further question
with this. You said I need to set SqgMapSettings with the map scale and
extent. I probably want the map scale and extent from the canvas, but in a
processing algorithm I don't know how to get that information.

Thanks,

Calvin

As far as creating a render context goes -- the easiest way is via
> QgsRenderContext.fromMapSettings(). You create a QgsMapSettings
> object, set it all up with the desired map scale and extent, etc, and
> then convert it to a render context. This ensures that regardless of
> the size units used by the symbol (e.g. if it's in map units) it will
> be correctly sized...
>
> Nyall
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200817/f2fe2d6b/attachment.html>


More information about the QGIS-Developer mailing list