xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry Kormann <tkorm...@ilog.fr>
Subject Re: Transforming coordinate system at runtime
Date Fri, 07 Sep 2001 15:10:41 GMT
On Friday 07 September 2001 09:03, Chris Smith wrote:
> Hi,
>
> We're currently having a problem displaying some SVG which we have
> generated on the fly inside our program, the problem being that we just get
> an empty window when we try to view the SVG in a JSVGCanvas. I have
> attached a samle of our SVG. As you can see, the co-ordinates are shifted a
> long way from the origin. At the moment we are trying to change the
> rendering transform to shift the graphics back to the origin using:
>
> ...
> JSVGCanvas canvas = new JSVGCanvas();
> ...

What's here ??? If you are specifying a URI or building an SVG DOM tree, and 
then use the setURI or setSVGDocument method - you can *not* assume that the 
document is not rendered or even built.

For futher details, have a look at the JSVGCanvas tutorial and the section 
that describes how to be notified using the different listeners we provide.

Finally, you can do the following in the gvtRenderingCompletedMethod or later 
if needed.

see: http://xml.apache.org/batik/svgcanvas.html

> AffineTransform trans = new AffineTransform();
> trans.translate(-315000.0, -812000.0);
> canvas.setRenderingTransform(trans);
> ...
>
> But this does not seem to be working =(

If the previous tips does not solve your problem, sorry about that and could 
you send us more details.

Regards,
Thierry.


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


Mime
View raw message