mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
and preparation stage from the symbol layer rendering stage, and ensure that QgsSymbolLayer::startFeatureRender and ::stopFeatureRender is correctly called in the right sequence when rendering multi-layer symbols This fixes issues with symbol layers which rely on startFeatureRender and stopFeatureRender to correctly render, e.g. the Random Marker Fill symbol layer. Before this fix, the logic looked like: - for every symbol layer in the symbol, call startFeatureRender - for each part in polygon, prepare the part geometry and then render each symbol layer - for every symbol layer in the symbol, call stopFeatureRender The issue with this approach is that symbol layers which defer rendering to the stopFeatureRender stage are always rendered after ALL other symbol layers in the symbol, regardless of the actual order of the symbol layers. Ultimately this causes Random Marker Fill layers to always render on the top of symbols. The new logic is: - for each part in polygon, prepare the geometry and store the result - for each symbol layer in the symbol: - call startFeatureRender - render the layer using each of the previously prepared parts - call stopFeatureRender This results in correct stacking of the random marker fill in multi layer symbols, because the stopFeatureRender call is correctly called before the next layer's startFeatureRender and renderPolygon calls Also, use QVector instead of QList for rings for improved efficiency