Alice Mello Cavallo wrote:

Which jars should I import in order to use SVGGenerator?

See: http://xml.apache.org/batik/install.html#jarFiles


   It appears you may be able to pair things down a bit from
this (in particular I don't think there is actually a
dependency on 'gvt' from svggen - and it is possible you
can 'get away' without batik.parser.

I have tried to import only batik-svggen and batik-dom, but it did not work, therefore I imported all available.
Thanks,
Alice
At 05:18 PM 3/4/2004 -0500, Thomas DeWeese wrote:


Hi Alice,

I think you have two problems, one easily solved the other not.

1) (easy) You need to upgrade to Batik 1.5.1 or else call
'getGeneratorContext().setPrecision(<n>)' on the SVGGraphics2D.
  This will eliminate the Null Pointer Exception (NPE).

2) SVGGraphics2D doesn't support XOR mode (mostly because
   SVG doesn't support it).  I don't believe this has anything
   to do with your NPE - but it might make the generated drawing
   "wrong".  It strikes me as a little odd to be drawing something
   with XOR for a static picture (it's usually used for interactive
   stuff).  If you just want a high-contrast line you may want to try
   drawing the path with a wide black stroke then a narrower 'white'
   stroke (perhaps with a dash or something).


Alice Mello Cavallo wrote:


  I have an application in Java that draws a face using custom classes.
[...] Below is the error message.


Error msg:
XOR Mode is not supported by Graphics2D SVG Generator
java.lang.NullPointerException
at org.apache.batik.svggen.SVGGeneratorContext.doubleString(Unknown Source)
at org.apache.batik.svggen.SVGGraphicObjectConverter.doubleString(Unknown Source)
at org.apache.batik.svggen.SVGLine.toSVG(Unknown Source)
at org.apache.batik.svggen.SVGShape.toSVG(Unknown Source)
at org.apache.batik.svggen.SVGGraphics2D.draw(Unknown Source)
at faceLL.Segment.paint(Segment.java:222)
at faceLL.Contour.paint(Contour.java:55)
at faceLL.Face.paint(Face.java:45)
at faceLL.ElasticFace$MyFrame.paint(ElasticFace.java:107)
at faceLL.ElasticFace.main(ElasticFace.java:243)




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


Alice Cristina Mello Cavallo
Interdisciplinary PhD Candidate at Tufts University
Learning, Technology and Drama
http://www.media.mit.edu/~mello/


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




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



Reply via email to