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 Chris Williams <ch...@vt.edu> on 2003/12/05 19:58:58 UTC

Java 2D code generator

I was wondering if within Batik there was a code generator to convert 
SVG documents into java 2d code (actual code, not rendered). I know 
SVGCanvas2D will render it, but i am looking to generate the actual 
code, so i can package that up.

Any ideas?

Chris Williams


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


Re: Java 2D code generator

Posted by Thomas DeWeese <Th...@Kodak.com>.
Chris Williams wrote:

> I was wondering if within Batik there was a code generator to convert 
> SVG documents into java 2d code (actual code, not rendered). I know 
> SVGCanvas2D will render it, but i am looking to generate the actual 
> code, so i can package that up.

    There currently is not a a code generator in Batik.

> Any ideas?

    Well you could write a tool that walked the GVT tree
and instead of rendering each node generated the corresponding
Java2D code.

    You could also subclass the AbstractGraphics2D (baseclass
of our SVGGraphics2D) and implement the methods by generating
Java2D code.

    Of the two the Graphics2D implementation would probably
be the better route (it would also be more generally useful).




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