Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ptsfa!lll-lcc!mordor!sri-spam!rutgers!husc6!endor!stew From: stew@endor.UUCP Newsgroups: comp.sys.mac Subject: Re: Re: Laserwriter, PostScript, and Patterns Message-ID: <1513@husc6.UUCP> Date: Fri, 27-Mar-87 23:40:46 EST Article-I.D.: husc6.1513 Posted: Fri Mar 27 23:40:46 1987 Date-Received: Sun, 29-Mar-87 18:45:39 EST References: <2302@cec2.UUCP> <345@gssc.UUCP> <465@batcomputer.tn.cornell.edu> <360@gssc.UUCP> Sender: news@husc6.UUCP Reply-To: stew@endor.UUCP (Stew Rubenstein) Organization: Aiken Computation Lab Harvard, Cambridge, MA Lines: 39 Obviously, it's possible to fill an area with a pattern; the Macintosh Laser Prep does it. Look at that for an example. Basically, you use the setscreen operator to define a halftone screen with a procedure that orders the pixels in the halftone screen cell so that the pixels you want white in your pattern are the ones that the fill operator whitens to form the halftone screen. Normally, the standard spot function is used which is optimized for the device. You can get "line screen" or "dot screen" effects fairly easily by redefining the spot function. Try: /shape{newpath 0 0 moveto 20 100 lineto 80 100 lineto 100 0 lineto closepath fill }def gsave 50 50 translate /dotFreq 10.0 def dotFreq 0 {dup mul exch dup mul add 1 exch sub} setscreen 0.05 0.05 0.99 {setgray shape 72 dotFreq div dup 3 mul translate}for grestore If you just want to get patterns with 72 dpi resolution like you get from quickdraw, use the routines defined in the Laser Prep: try something like md begin gsave 50 300 translate 48pat % a simple striped pattern shape grestore showpage where 48 is the number of zero bits in the 8-byte pattern. Obtaining patterns finer-grained than that by modifying the Laser Prep definitions for pat is left as an exercise for the reader.