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 Axel Hallez <Ax...@UGent.be> on 2006/05/23 10:30:59 UTC
Showing svg document in two canvasses
Hello all,
I want to show an svg document in two canvasses, one canvas is
integrated in a JFrame, the other one is shown full screen. If the user
has a multiscreen setup, both could be visible at same time. The
document is dynamically changed by an eventlistener.
Now I'm wondering about what's the most efficient way to do this. I
could have two instances of JSVGCanvas each with its own document and
apply all updates twice. However this seems to to be wastefull on
resources. Is it possible for two JSVGCanvasses to share the document?
Thanks in advance,
Axel Hallez
--
-------------------------------------------------
Database Document & Content Management
Vakgroep Telecommunicatie en Informatieverwerking
Universiteit Gent
St.-Pietersnieuwstraat 41, 9000 Gent
Tel. + 32 (9) 264 4222
Fax + 32 (9) 264 4277
-------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Showing svg document in two canvasses
Posted by th...@kodak.com.
Hi Axel,
Axel Hallez <Ax...@UGent.be> wrote on 05/23/2006 04:30:59 AM:
> I want to show an svg document in two canvasses, one canvas is
> integrated in a JFrame, the other one is shown full screen. If the user
> has a multiscreen setup, both could be visible at same time. The
> document is dynamically changed by an eventlistener.
>
> Now I'm wondering about what's the most efficient way to do this. I
> could have two instances of JSVGCanvas each with its own document and
> apply all updates twice. However this seems to to be wastefull on
> resources. Is it possible for two JSVGCanvasses to share the document?
It is not possible for two JSVGCanvases to share a document (the
main "real" problem is that it becomes impossible to make sense of
things in the SVG DOM like 'getScreenCTM').
However, you can have the SVG document associated with one Canvas
and share the GVT tree with a JGVTComponent. You still have some
problems as the JGVTComponent doesn't automatically track updates,
however with some work you should be able to propagate the region
updates from the JSVGCanvas the JGVTComponent.
This is the basic approach taken by the thumbnail viewer in
Squiggle (note that it does not update the thumbnail view...).
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org