Hi Jake,
"Jake B" <[EMAIL PROTECTED]> wrote on 04/23/2007 11:55:04 AM:
> I'm just getting started with Batik, and I'm trying to get a
> sense of what it can do. Specifically, I have a question regarding
> the SVGGraphics2D SVG generator. It says on the Batik webpage, that
> SVGGraphics2D is a generator "that creates an SVG document from
> Java2D calls".
> My understanding of Java Swing is that it "paints" graphical user
> interfaces through calls to the Java2D API.
Correct.
> The core Java libraries, including Swing, have been released under
> the JLP (I think), which allows reuse in academic research. I also
> believe that Sun is supposed to release the remainder of the Java
> source under the GPL later this year. In any case, the source code
> to Swing is exposed and modifiable.
> My question is, would it be feasible to modify Swing so that,
> instead of calling the Java2D API, it calls the SVGGraphics2D API?
Yes, this is actually quite simple. You can call the paint
method on any Swing component. There are a few things you need
to be careful of (like swing double buffering). Also Batik
provides a helper class, batik.svggen.SwingSVGPrettyPrint.
> Does SVGGraphics2D API implement the Java2D API? Does it do so fully?
It is nearly complete however there are a few corner cases
that can't really be mapped to SVG. But the coverage is very good.
> If anyone has any insight into this, I would greatly appreciate it
> if you would let me know.
> Thanks.
>
> -Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]