• Advertisement
Sign in to follow this  
  • entries
    21
  • comments
    30
  • views
    12107

svg in java

Sign in to follow this  

303 views

So I thought it would be cool to use SVG in my java games. The standard library to do this is Batik. The library is pretty sweet, but damn is it huge- 4mb of class files. 1mb of this is from the included XML reader Xerces. Damned if I know how an XML reader can take up 1mb.

It works well, but you can tell Batik is meant for the high-end user. Doing something that seems like it would be simple (like, hey, how about you just draw this SVG file where I tell you to?) is actually a lot of work. And it's made more difficult by the huge API to swim through.

This graph pretty much sums it up. According to Batik, I am a "serious hacker"

Anyway, I think I have it under control- I already have a class that loads a document and renders it to an offscreen image, suitable for drawing.

Also, I looked into SVGSalamander, which sounded promising because it's suppossed to be optimized for games. But I couldn't even get it to work, even when I tried using their example code. Soooooo, yeah.
Sign in to follow this  


2 Comments


Recommended Comments

I've always thought that SVG was cool… the only reason I've never tried to incorporate it into any of my programs was because I can't make any decent SVG images [smile]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement