Other methods could easily be supported in the future. The method now works as planned for the contour style. For style modules with Python shaders, there still is a problem that I will fix right away.
To prevent strokes from piling up after each render, I clear the canvas at each render now (as it should have been all along)