Philip
Philip

Reputation: 3500

Visualize vector graphics in Java, which library?

I need to visualize a large vector graphic. It's a map of roads, the roads are just lines. Is there a library for that? It would be nice if that library had support for zoom-in/zoom-out and would be easy to extend. E.g. to implement selection of roads or some nice mouse-over effects. The licence should permit usage in a commercial project.

Thanks, Philip

Edit: Is there a reason not to go with Graphics2D or SWT Graphics? (The project is on SWT and doesn't involve any SVGs.)

Upvotes: 3

Views: 8977

Answers (2)

Lev Khomich
Lev Khomich

Reputation: 2247

Have a look at Apache Batik

Batik is a Java-based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as display, generation or manipulation. Another possibility is to use Batik’s modules to convert SVG to various formats, such as raster images (JPEG, PNG or TIFF) or other vector formats (EPS or PDF, the latter two due to the transcoders provided by Apache FOP). The latest revision of Batik, release 1.7, is a conformant static SVG implementation and supports interactivity, linking and scripting features of the SVG specification.

Another good alternatives are FreeHEP and VectorGraphics2D

Upvotes: 4

Riduidel
Riduidel

Reputation: 22308

If you're talking about SVG-like graphics, i think Batik is the way.

Upvotes: 2

Related Questions