Hi Thomas,
thanks, you solved my problem! Perfect! Thanks!!!
Sorry, for thinking that batik could be buggy. I will never do it
again. I promise! ;-)
Thomas

On 1/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi Thomas,

"Thomas King" <[EMAIL PROTECTED]> wrote on 01/11/2007 09:58:38 AM:

 > If I export a JSVGCanvas to an eps file using the org.jibble.epsgraphics
 > library, I get a really weired looking eps image (
 > http://thomas.m.king.googlepages.com/home - click on the
eps file -
 > the svg file is also listed as reference).

>  Second, to export the canvas I do the following:
 > FileWriter = new FileWriter(new File("example.eps"));
 > Graphics2D g2d = new EpsGraphics2D("RadioMap");

   I think the major problem is:

>  svgCanvas.paint(g2d);

   This is not a very good way to get a drawing of the
Canvas.  This will simply draw the offscreen bitmap that
the Canvas uses to update the screen (this is probably
why the EPS file has the 'SVG' content as a large bitmap
image, rather than as lines).

   I think you want to replace the last 'paint' line with
something like:

    svgCanvas.getGraphicsNode().paint(g2d);

   You might want/need to do something with clipping...

> Did I miss something or is batik or epsgraphics buggy?

   A little of the first and the last (Batik is _never_
buggy ;).  It looks like the epsgraphics class doesn't
support transparency, which is why your graphic turned
out as a sort of 'black' on 'black' painting (typically
the transparent regions of the canvas are transparent
black).


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to