home *** CD-ROM | disk | FTP | other *** search
- /*
- * $VER: ToasterRender 2.0.0 (22.7.94)
- *
- * Arexx program for the ImageFX 2.0 image processing system.
- * Written by Thomas Krehbiel
- *
- * Render a frame to the Video Toaster frame buffer.
- *
- */
-
- OPTIONS RESULTS
-
- toastport = 'ToasterARexx.port'
- fsdev = 'RAM:'
- fspath = fsdev||'FrameStore'
- fsname = 'TempIFX'
- fsnum = 998
- fsfullname = fspath||'/'fsnum||'.FS.'||fsname
- fswidth = 752
- fsheight = 480
-
- GetMain
- IF rc ~= 0 THEN DO
- RequestNotify 'Requires a main buffer image.'
- EXIT
- END
- PARSE VAR result name width height .
-
- IF (~SHOW('L', toastport)) THEN
- ADDLIB(toastport, -1)
-
- IF ~SHOW('P', toastport) THEN DO
- RequestNotify 'Switcher is not running.'
- EXIT
- END
-
- IF ~EXISTS(fspath) THEN
- ADDRESS COMMAND 'Makedir' fspath
-
-
- IF (width ~= fswidth) | (height ~= fsheight) THEN DO
- RequestThree '"Scale image to fill Toaster screen?"' 'Yes' 'No' 'Cancel'
- IF rc ~= 0 THEN CALL Abort
- IF result = 'Yes' THEN DO
- Scale fswidth fsheight
- END
- END
-
- IF EXISTS(fsfullname) THEN DO
- RequestResponse 'FrameStore' fsnum 'already exists. Delete it?'
- IF rc ~= 0 THEN CALL Abort
- ADDRESS COMMAND 'Delete' fsfullname
- END
-
- GetPrefs SaveNails
- oldnails = result
- SetPrefs SaveNails Off
-
- SaveBufferAs 'FrameStore' fsfullname NoCompress
- IF rc ~= 0 THEN CALL Abort
-
- oldfsdev = Switcher(FSNM)
-
- Switcher(TOSW)
- IF oldfsdev = 'RAM:' THEN
- Switcher(FSBD)
- ELSE DO
- IF Switcher(FSDV, 'RAM:') ~= SWITCHER THEN DO
- Switcher(TOWB)
- RequestNotify 'Could not change FrameStore device.'
- CALL Abort
- END
- END
-
- i = Switcher(FMXI, fsnum)
- IF i = 0 THEN DO
- Switcher(TOWB)
- RequestNotify 'Switcher cannot find FrameStore' fsnum
- CALL Abort
- END
-
- IF Switcher(FMLD, fsnum) ~= SWITCHER THEN DO
- Switcher(TOWB)
- RequestNotify 'Switcher cannot load FrameStore' fsnum
- CALL Abort
- END
-
- Switcher(TAKE)
- Switcher(TOWB)
- ScreenToFront
-
- Abort:
-
- IF EXISTS(fsfullname) THEN
- ADDRESS COMMAND 'Delete' fsfullname
-
- IF oldfsdev ~= 'OLDFSDEV' THEN
- Switcher(FSDV, oldfsdev)
-
- SetPrefs SaveNails oldnails
-
- REMLIB(toastport)
-
- EXIT
-