SVG到Java的Path2d解析器 [英] SVG to Java's Path2d parser
本文介绍了SVG到Java的Path2d解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否存在将svg绘图转换为Java的Path2d的应用程序?
Is there an application to convert a svg drawing to Java's Path2d?
与使用任何SVG到Java工具包相比,此方法是否更有效? (效率是指运行速度).
Is this method more efficient than using any SVG to Java toolkit? (with efficiency i refer to runtime speed).
谢谢.
推荐答案
如果仅要将SVG路径语法转换为AWT路径对象,则可以使用 PathParser
类与 AWTPathProducer
.这将生成一个 ExtendedGeneralPath
,它不是Path2D
,但确实实现了Shape
.
If you just want to convert SVG path syntax to an AWT path object, you can use Batik's PathParser
class in conjunction with an AWTPathProducer
. That will generate an ExtendedGeneralPath
, which isn't a Path2D
but it does implement Shape
.
这篇关于SVG到Java的Path2d解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文