Why is Batik so much larger than JFreeSVG?

A discussion forum for JFreeSVG (a fast, lightweight, SVG generator for the Java platform).

Why is Batik so much larger than JFreeSVG?

Postby DavidThi808 » Sun Aug 14, 2016 3:08 pm

Hi all;

This is just curiosity. And I'm definitely not complaining. But why such a gigantic difference in size?

??? - thanks - dave
DavidThi808
 
Posts: 106
Joined: Fri May 27, 2005 7:44 pm
Location: Boulder, CO

Re: Why is Batik so much larger than JFreeSVG?

Postby charlieg » Mon Aug 15, 2016 3:11 pm

Registering simply to answer this because I found the general web page / information misleading by absence of explanation on the specific and critical difference:

Batik renders SVG. You can feed it an SVG string and it'll draw it for you. That is extremely non-trivial.

JFreeSVG outputs SVG. You feed it Java2D instructions and it produces an SVG string for you. That's... of very limited use, in my opinion.
charlieg
 
Posts: 1
Joined: Mon Aug 15, 2016 3:08 pm

Re: Why is Batik so much larger than JFreeSVG?

Postby david.gilbert » Tue Aug 16, 2016 10:34 pm

That's correct. JFreeSVG only does SVG generation via Java2D's Graphics2D API. Batik performs that function and, in addition, the much more complex task of interpreting SVG input and rendering it to the screen. That's why Batik is a much larger library - it does more things. For people that just want to generate SVG via the Graphics2D API, you can choose either Batik or JFreeSVG...both will do this job, but JFreeSVG is a smaller dependency and in the tests we've run JFreeSVG is much faster.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
david.gilbert
JFreeChart Project Leader
 
Posts: 11623
Joined: Fri Mar 14, 2003 10:29 am


Return to JFreeSVG

Who is online

Users browsing this forum: No registered users and 1 guest

cron