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 KRIEGER Nicolas <ni...@c-s.fr> on 2007/03/26 11:25:45 UTC

svg resized whne window resized

Hi,
I used the example given in the batik web page to display an svg file
using a jsvgcanvas
(http://xmlgraphics.apache.org/batik/using/swing.html). All is ok, when
the window is resized, the svg is resized to.
Then, I have to add interact whith the svg. What I have to do is only
change color of some elements. So, I create an jsvgcanvas and set the
documentState to "JSVGCanvas.ALWAYS_DYNAMIC". All works fine to change
the colors, but when the window is opened, the svg fit the window but is
not resized when the window is resized. It seems to be because of
"JSVGCanvas.ALWAYS_DYNAMIC", when I do not use this parameter, the svg
is resized (of course, I loose the interaction).
I don't know how to do to use both.
Any idea ?

Nicolas Krieger


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


Re: svg resized whne window resized

Posted by th...@kodak.com.
Hi Nicolas,

   Setting ALWAYS_DYNAMIC on a canvas should not affect the resizing of 
the
document to fill the canvas.  Can you provide a small example?  Certainly
on our end dynamic document resize properly.

   FYI a document will only resize if it has a 'viewBox' attribute on it.

"KRIEGER Nicolas" <ni...@c-s.fr> wrote on 03/26/2007 05:25:45 
AM:

> I used the example given in the batik web page to display an svg file
> using a jsvgcanvas
> (http://xmlgraphics.apache.org/batik/using/swing.html). All is ok, when
> the window is resized, the svg is resized to.
> Then, I have to add interact whith the svg. What I have to do is only
> change color of some elements. So, I create an jsvgcanvas and set the
> documentState to "JSVGCanvas.ALWAYS_DYNAMIC". All works fine to change
> the colors, but when the window is opened, the svg fit the window but is
> not resized when the window is resized. It seems to be because of
> "JSVGCanvas.ALWAYS_DYNAMIC", when I do not use this parameter, the svg
> is resized (of course, I loose the interaction).
> I don't know how to do to use both.
> Any idea ?
> 
> Nicolas Krieger
> 
> 
> ---------------------------------------------------------------------
> 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