How to display many SVGs in Java with high performance
Posted
by Oak
on Stack Overflow
See other posts from Stack Overflow
or by Oak
Published on 2010-04-20T09:41:07Z
Indexed on
2010/04/20
9:43 UTC
Read the original article
Hit count: 268
What I want
My goal is to be able to display a large number of SVG images on a single drawing area in Java, each with its own translation/rotation/scale values. I'm looking for the simplest solution allowing this, optionally even using OpenGL to speed things up.
What I've Tried
My initial naive approach was to use SVGSalamander to draw directly on a JPanel, but the performance was pathetic.
I poked around around and learned that I should do something like manually convert each SVG into a BufferedImage created with createCompatibleImage, then do the transformations I want, then draw it using double buffering. I ran into some troubles here, and before I continued I tried looking for frameworks to simplify things.
What I've Looked At
I've been a bit overwhelmed by the available options, which is why I'm turning to SO for help. I've looked at:
- Cairo (with Glitz maybe?)
- Libart - not sure if this actually supports SVGs
- FengGUI
- Slick - looks promising but a bit of an overkill
But couldn't decide what is best for me to start working with, and I hope someone here as experience with any of these doing similar things.
© Stack Overflow or respective owner