开发者

Raphael JS server-side

开发者 https://www.devze.com 2023-03-18 07:47 出处:网络
I\'m using Raphael js to create some graphics on the client. But I\'d now like to be able to do the same thing directly on the server to be able to create them and store them in batch.

I'm using Raphael js to create some graphics on the client. But I'd now like to be able to do the same thing directly on the server to be able to create them and store them in batch.

I've found solutions where the SVG form Raphael is fetched from the client, but not any completely server-side.

Does any one have exp开发者_Python百科erience using Raphael js server side only (with Rhino for instance)?

Thanks!


Take a look at PhantomJS - it's basically a full webkit browser you can run headless from the command line and render the output to a PNG.

There is actually an example using Raphael on the Quickstart guide.

phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号