%! % Date: Tue, 2 Jun 87 13:32:55 EDT % From: Don Hopkins % % Put this in a file called "pacman.ps", and load it into your NeWS % server with "psh pacman.ps". This is completely hedonistic, with no % socialy redeeming value whatsoever, so I'm certianly not responsible % for any time you waste watching your icons open and close! % % -Don % % Silly pacman icon zoom. % Don Hopkins, June 2, 1987 % Updated so the animation is based on time: % takes ZoomTime to chomp between icon and window. { /ZoomTime 1 60 div def /ChompTime .3 60 div def /ZoomPaint { % x y w h => - (Draw the zoom shape.) erasepage matrix currentmatrix 5 1 roll 4 2 roll translate scale .5 .5 translate 0 0 .5 starttime currenttime sub ChompTime div 1 and 0 eq { 0 0 moveto ZoomDir 20 add ZoomDir 330 add } { 0 360 } ifelse arc closepath stroke % fill setmatrix } store /ZoomProc { % - => - (Perform the zoom animation.) gsave 10 dict begin ZoomPaintInit FrameY FrameWidth 2 div add IconY IconWidth 2 div add sub FrameX FrameWidth 2 div add IconX IconWidth 2 div add sub atan Iconic? {180 add} if /ZoomDir exch def [IconX IconY IconWidth IconHeight] [FrameX FrameY FrameWidth FrameHeight] Iconic? {exch} if ZoomTime { aload pop ZoomPaint pause } Zoom erasepage end grestore } store /Zoom { % r1 r2 time proc => - (Zoom style animator.) 10 dict begin /starttime currenttime def /proc exch def /time exch def /r2 exch def /r1 exch def /rdeltas r2 r1 {sub} arrayop def { currenttime starttime sub time div /i exch def i 1 gt { exit } if r1 rdeltas {i mul add} arrayop proc } loop end } def /ZoomSteps 20 store } DefaultWindow send