[QGIS-Developer] Python rendered size of symbol
ccrook at linz.govt.nz
Sun Oct 20 23:47:46 PDT 2019
I want to calculate the rendered size of a marker symbol for a given feature, when the symbol includes data defined properties.
I'm having trouble navigating the API to determine the steps I need to achieve this!
I think I need to determine the render context for the symbol including the , in terms of the map canvas and the feature being rendered, and then call the symbol size(QgsRenderContext) function with that. But I haven't figured out how to put together the render context to use in this call. It looks like part of this is creating a QgsSymbolRendererContext and using .setFeature to create the context for the feature. But I'm still missing some bits.
Can anyone help with this please?
Or do you know of some documentation describing how the render contexts and expression contexts all fit together?
This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
More information about the QGIS-Developer