Closed davesnx closed 2 years ago
Questions are welcome but better answered on the OCaml forum (you can log in there with your github account). Please post there next time.
The sentence "should I be able to render the surface PNG into the renderable" does not make sense, I think I think you misunderstand what a renderable is. Here's a definition.
Now:
Vgcairo.target
rendering a renderable applies the procedure described there each time you render on the underlying cairo context.Vgcairo.stored_target
rendering a renderable renders it on the underlying context. If you render a subsequent one it will create a new page to render it, if the format supports it, otherwise Invalid_argument
. If you think the documentation can be improved please send a PR.
Hey @dbuenzli,
I'm not familiar with cairo's backend and got a little lost with the difference between target/renderable and surface.
I read on the docs once you create a renderable with
target
While using
stored_target
These are quotes from https://erratique.ch/software/vg/doc/Vgr_cairo/index.html
I don't seem to understand yet what's the difference between rendering on a context or rendering in a new page.
So, my question is if I create a surface from a PNG and a renderable as PNG, should I be able to render the surface PNG into the renderable? or that's exactly what is not supported in Vg?
Sharing the minimum example below
Sorry for opening such basic questions and Thanks for reading.