List Info

Thread: Re: JSVGCanvas Transform Retention




Re: JSVGCanvas Transform Retention
country flaguser name
United States
2007-10-20 05:52:18

Hi Jon,

poozle <jdb25bath.ac.uk> wrote on 10/04/2007 11:31:25 AM:

&gt; That works almost perfectly, I think I must have been setting it too early
> before (before the document was loaded in).  The only trouble is now it
> "bounces" (goes to the origin for a second then to the right position).
&gt;
> I think I must be setting it in the wrong load event (there seemed to be too
> many of them), which of them should I use as I couldn't work it out.

   If you have a dynamic canvas then you can do it in the SVG Load
event (JSVGCanvas.addSVGLoadEventDispatcherListener).  ;If you don't
have a dynamic canvas then you will need to subclass the canvas and
override "setGraphicsNode(GraphicsNode gn, boolean createDispatcher)".
Then call setRenderingTransform after calling 'super.setGraphicsNode(...)'.

> thomas.deweese wrote:
&gt; >
> > Hi Jon,
>; >
> >    For 'compatible' documents (same viewBox[*]) this is as simple as
> > copying the Rendering Transform (JSVGCanvas.getRenderingTransform())
&gt; > before
> > you load the new document and then set that RenderingTransform (best done
>; > in the SVG on load event).
> >
> > [*] BTW if the viewBox spec's don't match then it's actually a little hard
> > to
> > say what it means to keep the same zoom/pan/rotate (you would have to have
> > some
>; > 'other' way to 'align' the underlying coordinate system).
> >
>
> --
> View this message in context: http://www.nabble.com/JSVGCanvas-
> Transform-Retention-tf4548468.html#a13042476
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
> For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org
>
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )