(FILECREATED "10-SEP-83 16:18:20" {PHYLUM}<LISPUSERS>IMAGEDEMO.;2 3730 changes to: (FNS IMAGEDEMO) previous date: "29-NOV-82 12:05:31" {PHYLUM}<LISPCORE>COLOR>IMAGEDEMO.;3) (* Copyright (c) 1983 by Xerox Corporation) (PRETTYCOMPRINT IMAGEDEMOCOMS) (RPAQQ IMAGEDEMOCOMS ((FNS IMAGEDEMO IMAGEDEMO2 GETWREGION NEWFILTER) (VARS (IMAGEDEMOMENU) (IMAGEDEMO2MENU)) (FILES HLCOLOR))) (DEFINEQ (IMAGEDEMO [LAMBDA (PICTUREFILE INITIALHOW NODRAWFLG) (* rrb "10-SEP-83 16:11") (* put up a picture and prompts the user for regions to be processed with one of a number of algorithms.) (PROG (REGION HOW) FILELP (COND ((SETQ FILE (FINDFILE (OR PICTUREFILE (QUOTE GIRL22-GREEN.AIS)) NIL AISDIRECTORIES))) (T (ERROR "no picture file found" PICTURE) (GO FILELP))) (OR NODRAWFLG (AISBLT FILE NIL NIL (COLORSCREENBITMAP) NIL NIL NIL NIL INITIALHOW)) LP (SELECTQ [SETQ HOW (MENU (COND ((type? MENU IMAGEDEMOMENU) IMAGEDEMOMENU) (T (SETQ IMAGEDEMOMENU (create MENU ITEMS ←(QUOTE ((Floyd-Steinberg (QUOTE FSA) "propagates error") (Truncate (QUOTE TRUNCATE) "ignores error") (STOP (QUOTE STOP) "exits this program"))) CENTERFLG ← T CHANGEOFFSETFLG ← T] ((TRUNCATE FSA) (SETQ REGION (GETCOLORREGION)) (AISBLT FILE (fetch (REGION LEFT) of REGION) (fetch (REGION BOTTOM) of REGION) (COLORSCREENBITMAP) (fetch (REGION LEFT) of REGION) (fetch (REGION BOTTOM) of REGION) (fetch (REGION WIDTH) of REGION) (fetch (REGION HEIGHT) of REGION) HOW)) (STOP (RETURN)) NIL) (GO LP]) (IMAGEDEMO2 [LAMBDA (FILE) (* rrb "29-NOV-82 11:57") (PROG [W (FILE (OR FILE (QUOTE {DSK}GIRL22-GREEN.AIS] (SETQ W (AISBLT FILE)) LP (SELECTQ [MENU (COND ((type? MENU IMAGEDEMO2MENU) IMAGEDEMO2MENU) (T (SETQ IMAGEDEMO2MENU (create MENU ITEMS ←(QUOTE ((SmoothRegion (QUOTE SMOOTHREGION) "prompts for a region to smooth over.") (Stop (QUOTE STOP) "Stops the programs."] [SMOOTHREGION (SETQ W (AISBLT FILE NIL NIL NIL NIL NIL NIL NIL (QUOTE FSA) (SMOOTHHIST (HISTARRAY FILE (GETWREGION W] (STOP (RETURN)) NIL) (GO LP]) (GETWREGION [LAMBDA (W) (* rrb " 2-NOV-82 18:15") (* gets a region from a window.) (TOTOPW W) (PROG ((REG (GETREGION))) (RETURN (create REGION LEFT ←(IDIFFERENCE (fetch LEFT of REG) (DSPXOFFSET NIL W)) BOTTOM ←(IDIFFERENCE (fetch BOTTOM of REG) (DSPYOFFSET NIL W)) WIDTH ←(fetch WIDTH of REG) HEIGHT ←(fetch HEIGHT of REG]) (NEWFILTER [LAMBDA (FILE WINDOW) (* rrb " 2-NOV-82 19:13") (PROG [(HISTARRAY (HISTARRAY FILE (GETWREGION WINDOW] (GRAPHHISTARRAY HISTARRAY) (RETURN (AISBLT FILE NIL NIL NIL NIL NIL NIL NIL (QUOTE FSA) (SMOOTHHIST HISTARRAY]) ) (RPAQQ IMAGEDEMOMENU NIL) (RPAQQ IMAGEDEMO2MENU NIL) (FILESLOAD HLCOLOR) (PUTPROPS IMAGEDEMO COPYRIGHT ("Xerox Corporation" 1983)) (DECLARE: DONTCOPY (FILEMAP (NIL (431 3567 (IMAGEDEMO 441 . 1975) (IMAGEDEMO2 1977 . 2716) (GETWREGION 2718 . 3259) ( NEWFILTER 3261 . 3565))))) STOP