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 Bartosz Celmer <JO...@idea.net.pl> on 2004/07/20 22:07:12 UTC

Copying SVGDocument

Hello.

I need to copy SVGDocument and then modify it. I try to find any solution in
batik mailing list but with no results. I'm looking for something like this:

 

SVGDocument doc = new SVGDocument(svgCanvas.getSVGDocument()); 

But of course in there is no method like this in batik. Problem is that when
I do something like this:

SVGDocument doc = svgCanvas.getSVGDocumet();

then I change smoothing in doc, it it's also changed in svgCanvas (it's of
course normal - doc is just reference not new object). What I need is
exactly  copy of SVGDocument stored in svgCanvas. 

 

Thanks for any help

Bartek


RE: Copying SVGDocument

Posted by Bartosz Celmer <JO...@idea.net.pl>.
Hi
Thank you. It's so simple and works. 
Bartek

-----Original Message-----
From: Nikhil Dinesh [mailto:nikhild@seas.upenn.edu] 
Sent: Wednesday, July 21, 2004 12:08 AM
To: Batik Users
Subject: Re: Copying SVGDocument

Hi,

SVGDocument doc =
(SVGDocument)((svgCanvas.getSVGDocument()).cloneNode(true));

should work.

-Nikhil


On Tue, 20 Jul 2004, Bartosz Celmer wrote:

> Hello.
>
> I need to copy SVGDocument and then modify it. I try to find any solution
in
> batik mailing list but with no results. I'm looking for something like
this:
>
>
>
> SVGDocument doc = new SVGDocument(svgCanvas.getSVGDocument());
>
> But of course in there is no method like this in batik. Problem is that
when
> I do something like this:
>
> SVGDocument doc = svgCanvas.getSVGDocumet();
>
> then I change smoothing in doc, it it's also changed in svgCanvas (it's of
> course normal - doc is just reference not new object). What I need is
> exactly  copy of SVGDocument stored in svgCanvas.
>
>
>
> Thanks for any help
>
> Bartek
>
>

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




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


Re: Copying SVGDocument

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
Hi,

SVGDocument doc =
(SVGDocument)((svgCanvas.getSVGDocument()).cloneNode(true));

should work.

-Nikhil


On Tue, 20 Jul 2004, Bartosz Celmer wrote:

> Hello.
>
> I need to copy SVGDocument and then modify it. I try to find any solution in
> batik mailing list but with no results. I'm looking for something like this:
>
>
>
> SVGDocument doc = new SVGDocument(svgCanvas.getSVGDocument());
>
> But of course in there is no method like this in batik. Problem is that when
> I do something like this:
>
> SVGDocument doc = svgCanvas.getSVGDocumet();
>
> then I change smoothing in doc, it it's also changed in svgCanvas (it's of
> course normal - doc is just reference not new object). What I need is
> exactly  copy of SVGDocument stored in svgCanvas.
>
>
>
> Thanks for any help
>
> Bartek
>
>

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