gpt4 book ai didi

java - SVG 到 Java 的 Path2d 解析器

转载 作者:行者123 更新时间:2023-12-02 00:52:44 26 4
gpt4 key购买 nike

有没有一个应用程序可以将 svg 绘图转换为 Java 的 Path2d?

此方法比使用任何 SVG to Java 工具包更有效吗? (效率我指的是运行速度)。

谢谢。

最佳答案

如果您只想将 SVG 路径语法转换为 AWT 路径对象,可以使用 BatikPathParserAWTPathProducer 结合使用的类(class)。这将生成 ExtendedGeneralPath ,它不是 Path2D,但它确实实现了 Shape

关于java - SVG 到 Java 的 Path2d 解析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2357222/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com