xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: suspendRedraw(), unsuspendRedraw()
Date Wed, 07 Jun 2006 16:06:48 GMT
Hi Andreas,

Andreas Neumann <neumann@karto.baug.ethz.ch> wrote on 06/07/2006 11:51:09 
AM:

> I can confirm that try/catch now works with SVN.

   Good.

> As I understand, the current implementation of Batik always reacts like 
> if suspendRedraw()/unsuspendRedraw() would be called. It does not update 

> the screen while it is executing a script.

   The second sentence is true, Batik never updates the screen while it
is executing a script.  The first part is not, in theory script could call
'suspendRedraw', set a timeout, let the script function exit, then 
sometime
later in the timeout call 'unsuspendRedraw', Batik would likely redraw
once the script function exited even though it should not...

> Does Batik allow to update the screen on demand? It doesn't yet support 
> SVGSVGElement.forceRedraw() - is there any other method as a workaround?

   No there is currently no way for script to trigger a repaint in the 
middle
of script execution.  I should say that implementing these methods 
probably
would not be particularly hard (Batik already suspends redraws in some 
cases,
so just setting a Boolean should suffice for suspend/unsuspend, 
forceRedraw
is mostly just calling the existing 'repaint' method on the UpdateManager.

   Since they seem like they might start being useful it may be worth 
trying
to implement them...

> >>My problem is that some browsers implement suspendRedraw and others 
> >>don't and I have to test if the method is available.
> >>
> >>I tried with try/catch but it did not work either.
> >> 
> >>
> >
> >Yeah, it?s not ideal that those methods are throwing Errors instead of
> >some other RuntimeException.  I?ve just made a change in SVN for them 
to
> >throw UnsupportedOperationExceptions instead, which makes them
> >capturable from script.
> >
> >This probably doesn?t help you, however, if you want to support any
> >older version of Batik.  I don?t think there?s a reasonable way of
> >sniffing the Batik version, either.
> >
> > 
> >
> 
> 
> -- 
> ----------------------------------------------
> Andreas Neumann
> Institute of Cartography
> ETH Zurich
> Wolfgang-Paulistrasse 15
> CH-8093  Zurich, Switzerland
> 
> Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
> e-mail: neumann@karto.baug.ethz.ch
> www: http://www.carto.net/neumann/
> SVG.Open: http://www.svgopen.org/
> Carto.net: http://www.carto.net/
> 
> 
> ---------------------------------------------------------------------
> 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