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 Hans Stoessel <hs...@pm-medici.ch> on 2003/05/21 11:56:58 UTC

How can I load a SVG document and paint it using WMFGraphics2D?

Hi

I have a SVG document and want to load it. After that, I want to paint it
using WMFGraphics2D who extends the standard Graphic2D.

I can load the SVG document with:
    DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
    SVGDocument document = (SVGDocument)
impl.createDocument("c:\\temp\\test.svg", "svg", null);

But after that, I don't know how to paint it to the WMFGraphics2D. I think,
there is a possibility using the GVT tree, but I don't know exactly how to
to that.

Can anybod help me?

Thanks for help

Hans




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


Re: How can I load a SVG document and paint it using WMFGraphics2D?

Posted by Vincent Hardy <vi...@sun.com>.
Hans Stoessel wrote:

>Hi Vincent
>
>I want to transcode a SVG to WMF. And as i know WMFTranscoder do the other
>way.
>  
>
Ooops, sorry. I think Thomas answered your question later on. Let us 
know otherwise,
Vincent.



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


Re: How can I load a SVG document and paint it using WMFGraphics2D?

Posted by Hans Stoessel <hs...@pm-medici.ch>.
Hi Vincent

I want to transcode a SVG to WMF. And as i know WMFTranscoder do the other
way.

Hans

"Vincent Hardy" <vi...@sun.com> schrieb im Newsbeitrag
news:3ECB5277.4040105@sun.com...
> Hi Hans,
>
> You should be able to use the WMF transcoder directly:
> org.apache.batik.transcoder.wmf.tosvg
> <ci...@sun.com>.WMFTranscoder.
>
> Vincent.
>
> Hans Stoessel wrote:
>
> >Hi
> >
> >I have a SVG document and want to load it. After that, I want to paint it
> >using WMFGraphics2D who extends the standard Graphic2D.
> >
> >I can load the SVG document with:
> >    DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
> >    SVGDocument document = (SVGDocument)
> >impl.createDocument("c:\\temp\\test.svg", "svg", null);
> >
> >But after that, I don't know how to paint it to the WMFGraphics2D. I
think,
> >there is a possibility using the GVT tree, but I don't know exactly how
to
> >to that.
> >
> >Can anybod help me?
> >
> >Thanks for help
> >
> >Hans
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >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: How can I load a SVG document and paint it using WMFGraphics2D?

Posted by Vincent Hardy <vi...@sun.com>.
Hi Hans,

You should be able to use the WMF transcoder directly: 
org.apache.batik.transcoder.wmf.tosvg 
<ci...@sun.com>.WMFTranscoder.

Vincent.

Hans Stoessel wrote:

>Hi
>
>I have a SVG document and want to load it. After that, I want to paint it
>using WMFGraphics2D who extends the standard Graphic2D.
>
>I can load the SVG document with:
>    DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
>    SVGDocument document = (SVGDocument)
>impl.createDocument("c:\\temp\\test.svg", "svg", null);
>
>But after that, I don't know how to paint it to the WMFGraphics2D. I think,
>there is a possibility using the GVT tree, but I don't know exactly how to
>to that.
>
>Can anybod help me?
>
>Thanks for help
>
>Hans
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
>  
>


RE: How can I load a SVG document and paint it using WMFGraphics2D?

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "HS" == Hans Stoessel <hs...@pm-medici.ch> writes:

HS> Hi I have a SVG document and want to load it. After that, I want
HS> to paint it using WMFGraphics2D who extends the standard
HS> Graphic2D.

HS> I can load the SVG document with: DOMImplementation impl =
HS> SVGDOMImplementation.getDOMImplementation(); SVGDocument document
HS> = (SVGDocument) impl.createDocument("c:\\temp\\test.svg", "svg",
HS> null);

HS> But after that, I don't know how to paint it to the
HS> WMFGraphics2D. I think, there is a possibility using the GVT tree,
HS> but I don't know exactly how to to that.

    You need to build the GVT tree so you can call the GraphicsNode's
paint method.  This is done with the batik.bridge package, in
particular the GVTBuilder and BridgeContext classes.

HS> Can anybod help me?

    There are examples of how to do this scattered through Batik (in
particular I think bati.apps.slideshow does this fairly cleanly).


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