First attempt to solve issue #13. Successful for svg. Not so much for canvg rendered raster graphics (code deactivated)