samizdatco / skia-canvas

A GPU-accelerated 2D graphics environment for Node.js
MIT License
1.7k stars 66 forks source link

C or c++ API bindings #42

Closed zcream closed 2 years ago

zcream commented 3 years ago

Is it possible to use skia-canvas from a c++ project? For example, a string containing HTML5 canvas can be passed to the API to render to an offscreen buffer.

samizdatco commented 2 years ago

That would be difficult since a decent amount of the canvas API is implemented in the javascript portion of the library, so it's not simply a matter of linking to the binary in lib/v6. I suspect you'd need to bundle nodejs along with your project, at which point it might more sense to run skia-canvas as a separate process anyway.