[comp.sys.next] Eagle

ali@polya.Stanford.EDU (Ali T. Ozer) (06/02/89)

In article <6545@sdcsvax.UCSD.Edu> rfellman@ucsd.edu () writes:
>The movie file for the eagle is there under ../movies but it references
>a file called 'birds.ps' (you have to change the path).
>Since the movies are both postscript
>programs, I can't get them to run with scene. Preview and yap seem to
>have problems with them. I heard some mention of 'yap' changing so that
>one couldn't watch it 'running' a program.  Only the final result could
>be seen.  Perhaps this 'feature' makes it impossible to see movies
>anymore?

This new "feature" of Yap wouldn't prevent you from watching a PS program
like eagle.movie.ps in action; eagle does not draw in the Yap window
but opens up its own windows. The Bounce.ps program in the PostScript
examples directory (/NextDeveloper/Examples/PostScript) does a similar
thing; opens up a separate PostScript window and bounces it around the screen.

The problem with eagle (and some other PostScript programs from 0.8)
is the change in the way alpha operates. The "initwindowalpha" operator
does not exist in 0.9 (and beyond), and the "alphaimage" 
operator API has changed. The eagle movie uses both of these operators.
In eagle.movie.ps, if you get rid of the "initwindowalpha"
operator (along with its 2 arguments), and make the birds.ps file available,
you'll see that the movie starts running but instead of the eagle
a white square blob flies around. You'll need to fix the alphaimage
arguments to get the eagle back.

For more info on the changes, refer to the release notes for "alphaconvert" and
the window server.

BTW, you should note that the eagle program opens up a window in front of all
other windows. That is why you don't see any error messages displayed 
when you run eagle in Yap. You can also use "pft" for programs
like eagle; "pft" is a PostScript interpreter that is more low level
than even Yap (if you can get any lower...). Type "pft" to a shell,
and you're talking to PostScript. You of course don't have a window
to draw in, so one thing you can do is

/myWin 10 10 100 100 Retained window def  % create retained 100x100 window
Above 0 myWin orderwindow % bring it on screen, above everything else
myWin windowdeviceround % make it the device for the current gstate

after the above, all PostScript instructions you type to pft will go
to your freshly created window. Of course, the window is not an AppKit
window and does not have a title bar and does not respond to mouse
events in the usual AppKit fashion.

A better way to use pft might be to run an existing stand-alone PostScript
program like eagle without having to go through Yap... Then you simply
do

pft <amovie.ps    or

pft -f amovie.ps

The first will run the program and quit pft; unless the program does
something special (like wait for a user event), pft will probably reach EOF
and quit way before the PostScript program is fully
executed. The second method runs the specified PS program and
goes into pft input mode.  This method is probably more useful.

Anyway, so much for pft... Good luck with eagle!

Oh, one more thing which might bite you when playing with PostScript: 
File names to PS operators like "run" or file arguments to "pft -f" usually 
need to be fully specified; because the server isn't connected to the directory
you are in, relative path names usually won't work.

Ali Ozer, NeXT Developer Support
aozer@NeXT.com

jhc@vax5.CIT.CORNELL.EDU (06/05/89)

Ali,

Is this pft you mention the same as PS was in .8?  Similar??
Thanks.

-JimC
--
James H. Cloos, Jr.          "Entropy isn't what it used to be."
jhc@Crnlvax5.BITNET            --c/o Fortune @ batcomputer.UUCP
jhc@Vax5.CIT.Cornell.EDU	 #include <std_disclaimers.h>
cornell!vax1!vax5.cit.cornell.edu!jhc@rochester.UUCP
B-7 Upson Hall, Cornell Univ., Ithaca, NY 14853   +1 607 272 4519

ali@polya.Stanford.EDU (Ali T. Ozer) (06/07/89)

In article <18736@vax5.CIT.CORNELL.EDU> James H. Cloos, Jr. writes:
>Is this pft you mention the same as PS was in .8?  Similar??

Both pft and PS are simply shells which let you type in PostScript and
execute them in the NextStep window server. In that regard, they are
pretty much the same. pft did actually exist in 0.8, by the way.

Ali Ozer, NeXT Developer Support
aozer@NeXT.com