There used to be a way to add a callback function renderCallback.
I've searched high and low but can't seem to find any examples of how to replicate that in canvg 3.x.
Is there anyone who can point me in the right direction?
There used to be a way to add a callback function renderCallback.
I've searched high and low but can't seem to find any examples of how to replicate that in canvg 3.x.
Is there anyone who can point me in the right direction?
Copyright © 2021 Jogjafile Inc.
So I'm not sure why the canvg docs make no mention of this that I can tell (maybe they thought it was just self evident?) but in version 3.x and above the
render()method returns a promise.In my case I was trying to write an SVG to a canvas so I could then pull a PNG image from it.
So something like this was the solution I was looking for: