用于 Java 的 SVG 构建库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6657082/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 16:49:39  来源:igfitidea点击:

SVG building library for Java

javasvg

提问by biziclop

Is there a Java library that provides a component-based way to create SVG documents?

是否有提供基于组件的方式来创建 SVG 文档的 Java 库?

I don't need to render SVG, all I want to do is to construct an SVG tree programmatically and in a type-safe way.

我不需要渲染 SVG,我想做的就是以编程方式并以类型安全的方式构建 SVG 树。

采纳答案by Femi

Batikshould do just fine: its not just for rendering, you can do SVG construction/manipulation with it.

蜡染应该做得很好:它不仅用于渲染,您还可以使用它进行 SVG 构建/操作。

回答by jbeard4

Here is an example of how to use Batik to bootstrap and manipulate the SVG DOM:

以下是如何使用 Batik 引导和操作 SVG DOM 的示例:

http://xmlgraphics.apache.org/batik/using/dom-api.html

http://xmlgraphics.apache.org/batik/using/dom-api.html