[q-lang-cvs] q/modules/magick/examples magicktest.q,1.6,1.7
Brought to you by:
agraef
From: <ag...@us...> - 2003-12-28 11:36:35
|
Update of /cvsroot/q-lang/q/modules/magick/examples In directory sc8-pr-cvs1:/tmp/cvs-serv1672/examples Modified Files: magicktest.q Log Message: minor fixes in animation function Index: magicktest.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/magick/examples/magicktest.q,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** magicktest.q 27 Dec 2003 19:25:00 -0000 1.6 --- magicktest.q 28 Dec 2003 11:36:32 -0000 1.7 *************** *** 107,112 **** ==> animate (read_image "jurannessic_176x104.mpg" ()) ! You can also loop the animation by using the `repeat' function instead of ! `animate'. Sit back and watch. Enjoy. :) */ def FPS = 25; --- 107,111 ---- ==> animate (read_image "jurannessic_176x104.mpg" ()) ! Sit back and watch. Enjoy. :) */ def FPS = 25; *************** *** 114,127 **** animate IMGS ! = do (show VIS) IMGS || VIS ! ! where (W,H|_) = image_info (hd IMGS), ! VIS = ggi_open (sprintf "%s:-keepcursor" target), ! () = ggi_set_flags VIS GGI_FLAG_ASYNC || ! ggi_set_mode VIS (sprintf "%dx%d" (W,H)); ! ! repeat IMGS ! ! = loop VIS IMGS where (W,H|_) = image_info (hd IMGS), --- 113,117 ---- animate IMGS ! = catch id (loop VIS IMGS) where (W,H|_) = image_info (hd IMGS), *************** *** 134,139 **** show VIS IMG ! = ggi_getc VIS || halt if ggi_kbhit VIS; ! // *FIXME* we should really take a more decent way out here = ggi_put_box VIS (0,0) (W,H) PIXELS || ggi_flush VIS || sleep (T+1/FPS-time) --- 124,128 ---- show VIS IMG ! = ggi_getc VIS || throw VIS if ggi_kbhit VIS; = ggi_put_box VIS (0,0) (W,H) PIXELS || ggi_flush VIS || sleep (T+1/FPS-time) |