Susanne wrote:
>Hello!
>
>I want to design a SVG-grafik with Java2D-methods on an SVGGraphics2D.
>Because I rotated one of the SVGGraphics2D,
>I created 2 paint-methods and put the 2 different SVGGraphics2Ds into
> doc.getDocumentElement().appendChild(paint1(g).getRoot());
> doc.getDocumentElement().appendChild(paint2(g).getRoot());
>
>Is there any way to get out the SVG-Code?
>
>The stream(..) method is only defined for class
org.apache.batik.svggen.SVGGraphics2D
>
>java-code:
>
> DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
> String namespaceURI = SVGDOMImplementation.SVG_NAMESPACE_URI;
> Document doc = impl.createDocument(namespaceURI, "svg", null);
> SVGGraphics2D g = new SVGGraphics2D(doc);
>
> doc.getDocumentElement().appendChild(paint1(g).getRoot());
> doc.getDocumentElement().appendChild(paint2(g).getRoot());
>
> public SVGGraphics2D paint1(SVGGraphics2D g){
> //paint...
> return g;
> }
>
> public SVGGraphics2D paint2(SVGGraphics2D g){
> g.rotate(...);
> //paint...
> return g;
> }
I don't know what you are trying to accomplish.
My first guess would be that you are looking for:
SVGGraphics2D g = new SVGGraphics2D(doc);
paint1(g);
paint2(g);
g.stream(whatever);
Looks strange to me.
Jens Thieler
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]