Learning resources and tutorials for using the Java Batik Library [closed]

99封情书 提交于 2019-12-09 06:27:39

问题


I am using the Batik library, which is very useful to display SVG graphics in Java. For the basic use case of displaying and rendering an SVG document is quite simple to use. However, I want to do some other advanced graphic manipulation and I am struggling as I don't find any good resource that will allow me to perform the following types of task:

  • Detecting the component under the mouse
  • Getting a component by id and changing the color used to render
  • Manipulate components
  • Adding new components
  • Detecting mouse clicks on components

Is there any good resource or tips to use this library that you know about?


回答1:


You might like to read through the slides of a tutorial session on using Batik that I presented at SVG Open a couple of years ago.




回答2:


It may be worth looking at Java™ Drawing with Apache Batik: A Tutorial. The contents list looks pretty comprehensive.

I wrote an SVG display ages ago which used Batik and handled mouse events / colour changes. IIRC I had to make the changes to the SVG via the DOM interface since Batik didn't support that at all. Things may have changed now, of course.




回答3:


Have you looked through the W3C Doc on SVG?

It seems to list how to do most things; particularly look at Appendix A: DOM Enhancemenets, and if not in here, you can check the previous versions of the doc.

Hope it helps!




回答4:


Maybe it will also helpful

http://code.google.com/p/svgweb/



来源:https://stackoverflow.com/questions/1558852/learning-resources-and-tutorials-for-using-the-java-batik-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!