将KinteticJS绘图导出为SVG? [英] Export KinteticJS drawing to SVG?

查看:126
本文介绍了将KinteticJS绘图导出为SVG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 Kinetic JS 对象导出到SVG?

Is it possible to export Kinetic JS object to SVG?

或解决方法是将Kintetic JS的画布转换为SVG。

Or workaround is to convert Kintetic JS's canvas to SVG.

编辑:

是使用 fabricJS ,因为它在处理结构对象时支持画布到SVG呈现。

The best is to use fabricJS since it supports canvas to SVG rendering while working with fabric objects.

我接受Phrogz的回答,因为它也转换画布到svg,而不使用其他库在画布上绘制。

I accepted Phrogz's answer since it also does conversion canvas to svg without using some other library for drawing on canvas.

2:OK,我搞砸了,Phrogz的库是包装canvas元素,所以你使用它的方法在画布上绘制(我认为它只是在画布上监听并创建SVG路径)。所以最好的解决方案是fabricJS。

EDIT 2: OK, i messed up, Phrogz's library is wrapper around canvas element so you use it's methods to draw on canvas (I thought that it just 'listens' on canvas and creates SVG paths). So the best solution is fabricJS definitely.

推荐答案

最好的解决方案是使用 Fabric.js

The best solution is to use Fabric.js!

这篇关于将KinteticJS绘图导出为SVG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆