[kepler-dev] Animated GIFs in Ptolemy
Christopher Brooks
cxh at eecs.berkeley.edu
Tue May 10 11:05:46 PDT 2011
Hi Sven,
Thanks, I folded in that change to ptII/diva and updated ptII/lib/diva.jar.
It would be interesting to be able to show animated gif versions of plots.
_Christopher
On 5/9/11 3:47 PM, Sven Koehler wrote:
> we recently needed support for animated GIFs on the canvas in Kepler.
> I made some changes in Ptolemy to repaint the Image on frame change
> events and haven't seen any performance issues.
>
> Index: diva/canvas/toolbox/ImageFigure.java
> ===================================================================
> --- diva/canvas/toolbox/ImageFigure.java (revision 60927)
> +++ diva/canvas/toolbox/ImageFigure.java (working copy)
> @@ -157,6 +157,9 @@
> */
> public boolean imageUpdate(Image image, int infoflags, int x, int y,
> int width, int height) {
> +
> + if ( (infoflags & ImageObserver.FRAMEBITS) != 0 ) repaint();
> +
> if ((infoflags & (ImageObserver.ERROR | ImageObserver.ABORT)) != 0) {
> // Create a default error image.
> URL url = getClass().getResource(
--
Christopher Brooks, PMP University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670
More information about the Kepler-dev
mailing list