You can clone with
Let's say I want to render a semi-transparent street overlay to render on top of an aerial image, and that I want to have the following layers:
I would like the street overlay layer to be semi-transparent. If the individual symbolizers are semi-transparent, lots of rendering artifacts will appear:
Thus, the solution to this problem would be to have two new parameters for every layer: opacity and compositing mode.
Every layer should get its own canvas; once all elements in a layer have been rendered, that layer canvas is composed on top of the canvas for the resulting image.
For bonus points, instantiate canvases only for layers with 1.0 opacity and normal compositing, in order to not waste memory.
Hope it can be solved soon
/cc @ivansanchez and @novldp - who were the original reporters of this bug back when we used trac.
new work I'm about to commit implements this, adding a new style-level opacity value:
Whereas this is the same map with the same opacity value, but at the symbolizer level (the only previous option in older mapnik):
implement style-level opacity - closes #314
should have mentioned that comp-op is now also supported at style level (as well as symbolizer level), and will be available in the upcoming 2.1.0 release.
Awesome progress! This will indeed make life easy for these types of renders.
great to hear @novldp :)
use the current buffer in markers, building, shield, and line pattern…
… symbolizers to ensure that style level opacity and compositing work - refs #1262 and #314
demultiply the correct buffer (for style-level compositing and opacit…
…y) - refs refs #1262 and #314
fix behavior of compositing via python api now that we have premultip…
…lication issues sorted out in core - refs #1262 and #314 and #1211