You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Paul H. Roubekas" <pa...@roubekas.org> on 2002/11/28 00:56:48 UTC

Does Batik do SVG->Java 2D Graphic?

Can Batik go from a SVG file to a Java 2D graphic? If it can, where is
some documentation to read, or is there an example to study?
 
What I would like to do with the application I am developing is to take
XML transform through a Style sheet (XSLT) to get a SVG file/graphic.
What I would like to do is let the user see each graph, after being
transformed by the XSLT.  From what I understand about Batik it was
designed as a wrapper around the Java 2D APIs to allow for output to
SVG.  But I would like to do the reverse, take a SVG and create a Java
2D graphic.  I would like to allow the end user to proof the graph
before producing slides from it.  My application will create some unique
graphs from dynamic data on a monthly cycle, where the size of graph
elements change based on the data, similar to just changing the height
of a bar chart.  Can SVG->Java 2D be done with Batik?  I wanted to stay
away form building new Java code for every new graphic the customer will
come up with.  I was hoping to be able to just send an updated list of
selectable graphics, along with the XSLT for each new graph.  I don't
understand enough about Batik to get an answer from reading the
JavaDocs.
 
Suggestions welcome.
 
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------
Note: This email is digitally signed, that is why you see the icon
showing an attachment to this email.  The attachment is my Digital
Signature (a.k.a. public key).
 

RE: Does Batik do SVG->Java 2D Graphic?

Posted by "Paul H. Roubekas" <pa...@roubekas.org>.
Oh how embarrassing!  I was definitely reading the batik documentation
to fast.  Thanks for putting up with me and answering a question I would
have had answered if I slowed down a little.

Thanks again Vincent!


-----Original Message-----
From: Vincent Hardy [mailto:vincent.hardy@sun.com] 
Sent: Tuesday, December 03, 2002 10:55 AM
To: Batik Users
Subject: Re: Does Batik do SVG->Java 2D Graphic?

Hello Paul,

You can view SVG in Java using Batik using 
org.apache.batik.swing.JSVGCanvas.

You can get documentation at:

http://xml.apache.org/batik/svgcanvas.html

You can also convert SVG graphics to bitmaps using the transcoder API:

http://xml.apache.org/batik/rasterizerTutorial.html

which can be used from the command line with the rasterizer:

http://xml.apache.org/batik/svgrasterizer.html

Vincent.

Paul H. Roubekas wrote:
> Can Batik go from a SVG file to a Java 2D graphic? If it can, where is

> some documentation to read, or is there an example to study?
> 
>  
> 
> What I would like to do with the application I am developing is to
take 
> XML transform through a Style sheet (XSLT) to get a SVG file/graphic.

> What I would like to do is let the user see each graph, after being 
> transformed by the XSLT.  From what I understand about Batik it was 
> designed as a wrapper around the Java 2D APIs to allow for output to 
> SVG.  But I would like to do the reverse, take a SVG and create a Java

> 2D graphic.  I would like to allow the end user to proof the graph 
> before producing slides from it.  My application will create some
unique 
> graphs from dynamic data on a monthly cycle, where the size of graph 
> elements change based on the data, similar to just changing the height

> of a bar chart.  Can SVG->Java 2D be done with Batik?  I wanted to
stay away form building new 
> Java code for every new graphic the customer will come up with.  I was

> hoping to be able to just send an updated list of selectable graphics,

> along with the XSLT for each new graph.  I don?t understand enough
about 
> Batik to get an answer from reading the JavaDocs.
> 
>  
> 
> Suggestions welcome.
> 
>  
> 
>
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------
> 
> Note: This email is digitally signed, that is why you see the icon 
> showing an attachment to this email.  The attachment is my Digital 
> Signature (a.k.a. public key).
> 
>  
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

Re: Does Batik do SVG->Java 2D Graphic?

Posted by Vincent Hardy <vi...@sun.com>.
Hello Paul,

You can view SVG in Java using Batik using 
org.apache.batik.swing.JSVGCanvas.

You can get documentation at:

http://xml.apache.org/batik/svgcanvas.html

You can also convert SVG graphics to bitmaps using the transcoder API:

http://xml.apache.org/batik/rasterizerTutorial.html

which can be used from the command line with the rasterizer:

http://xml.apache.org/batik/svgrasterizer.html

Vincent.

Paul H. Roubekas wrote:
> Can Batik go from a SVG file to a Java 2D graphic? If it can, where is 
> some documentation to read, or is there an example to study?
> 
>  
> 
> What I would like to do with the application I am developing is to take 
> XML transform through a Style sheet (XSLT) to get a SVG file/graphic.  
> What I would like to do is let the user see each graph, after being 
> transformed by the XSLT.  From what I understand about Batik it was 
> designed as a wrapper around the Java 2D APIs to allow for output to 
> SVG.  But I would like to do the reverse, take a SVG and create a Java 
> 2D graphic.  I would like to allow the end user to proof the graph 
> before producing slides from it.  My application will create some unique 
> graphs from dynamic data on a monthly cycle, where the size of graph 
> elements change based on the data, similar to just changing the height 
> of a bar chart.  Can SVG->Java 2D be done with Batik?  I wanted to stay away form building new 
> Java code for every new graphic the customer will come up with.  I was 
> hoping to be able to just send an updated list of selectable graphics, 
> along with the XSLT for each new graph.  I don?t understand enough about 
> Batik to get an answer from reading the JavaDocs.
> 
>  
> 
> Suggestions welcome.
> 
>  
> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> Note: This email is digitally signed, that is why you see the icon 
> showing an attachment to this email.  The attachment is my Digital 
> Signature (a.k.a. public key).
> 
>  
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org