xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilo Behrmann" <Behrm...@FastGmbh.de>
Subject AW: drawing into JSVGCanvas
Date Tue, 18 Oct 2005 14:51:47 GMT
Ok i have coded this:

svgCanvas.setDocument(svgCanvas.getSVGDocument());
Element el = svgCanvas.getSVGDocument().createElement("polygon");
svgCanvas.getSVGDocument().getLastChild().appendChild(el);
svgCanvas.repaint();

but in can not see any one in the canvas?

-----Urspr√ľngliche Nachricht-----
Von: Roy Hollinger [mailto:royholl@prologic-inc.com]
Gesendet: Dienstag, 18. Oktober 2005 16:07
An: batik-users@xmlgraphics.apache.org
Betreff: Re: drawing into JSVGCanvas


You should be able to:

JSVGCanvas canvas = ....;

canvas.setDocument(yourMainDocument);
Element e = yourMainDocument.createElement("polygon");
yourMainDocument.appendChild......	// as you need.

or add everything to your document first, and then set the
document on the canvas.

You should still be able to write out your doc my accessing
yourMainDocument.

On Tuesday 18 October 2005 09:34 am, Tilo Behrmann wrote:
> Hi everyone,
>
> sorry for this question, because I am a newbie.
> I develop a application with batik.
> My question is can anyone post a code example
> how can I draw a polygon into a loaded SVG-graphic into JSVGCanvas an save
> it to a file.
>
> Thanks Tilo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

--
Roy Hollinger


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


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


Mime
View raw message