将 Dojox GFX Canvas 保存为 SVG

发布于 2024-08-20 19:46:55 字数 409 浏览 7 评论 0原文

有没有办法将 Dojox GFX 画布序列化为 SVG?

我正在寻找一种方法来保存我的 Dojox GFX 画布内容,该方法可以导出为图形文件(SVG、PNG、JPG 等),这样可以轻松保存或打印,而 SVG 似乎是最有可能的。

我找到了对函数 dojox.gfx.utils.toSvg 的引用,它看起来很完美:

http ://docs.dojocampus.org/dojox/gfx/utils/toSvg

但是这个函数在我的Dojo(1.1)实现中不存在,并且在Dojo Toolkit文档中没有提到,所以我不确定是否它存在。

谢谢。

Is there a way to serialize a Dojox GFX canvas as SVG?

I am looking for a way to save my Dojox GFX canvas contents in a way which can be exported as a graphics file (SVG, PNG, JPG, etc.) which could be easily saved or printed, and SVG seemed the most likely.

I found a reference to a function dojox.gfx.utils.toSvg, which looked perfect:

http://docs.dojocampus.org/dojox/gfx/utils/toSvg

But this function does not exist in my Dojo (1.1) implementation, and is not mentioned in the Dojo Toolkit documentation, so I am not sure if it exists.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人事已非 2024-08-27 19:46:55

它是1.4 中的新增内容。如果您有时间的话,很可能它可以向后移植到早期版本。

我不明白关于“Dojo Toolkit 文档中没有提到它,所以我不确定它是否存在”的部分 - 您自己提供了文档的链接。我很确定您可以在 /dojox/gfx/tests/ 中找到其使用示例

It is new in 1.4. Most probably it can be backported to earlier versions, if you have time on hands.

I didn't understand the part about "[it] is not mentioned in the Dojo Toolkit documentation, so I am not sure if it exists" — you gave the link to the documentation yourself. And I pretty sure you can find examples of its use in /dojox/gfx/tests/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文