A couple weeks ago I needed to write some Java2D code to draw a water droplet. If you have ever tried coding bezier paths off the top of you head it is not the simplest of things and can be frustrating. So I ended up drawing it in Illustrator and saving as SVG. The next stage was hacking with some code I had from before to take the path and spit out Java2D code for the shape. I have been thinking since that I could cleanup the code when I get the time and make a little application for extracting path shapes from SVG and writing out the Java2D code for them. Well I finally got the time and here is what I came up with.

SvgShapeExtractor Screen Shot

Download:
SvgShapeExtractor.jar (Executable Jar)
SvgShapeExtractorSrc.zip (Src)

Hopefully you will find this useful next time you need to write some Java2D shape code.