home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-27 | 13.4 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: PixMapToPostScript.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Jul 27 01:58:48 1995, modified Thu Jul 27 01:58:48 1995, creator 'CWIE', type ASCII, 12063 bytes "PixMapToPostScript.c" , at 0x2f9f 1394 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
49%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
33%
| TrID
| raw Group 3 FAX bitmap
| default (weak)
| |
16%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 50 69 78 4d 61 70 | 54 6f 50 6f 73 74 53 63 |..PixMap|ToPostSc|
|00000010| 72 69 70 74 2e 63 00 00 | 00 00 00 00 00 00 00 00 |ript.c..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 2f 1f 00 | 00 05 72 ac 3c db 98 ac |...../..|..r.<...|
|00000060| 3c db 98 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |<.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4e 27 00 00 |........|....N'..|
|00000080| 2f 2a 0d 50 69 78 4d 61 | 70 54 6f 50 6f 73 74 53 |/*.PixMa|pToPostS|
|00000090| 63 72 69 70 74 2e 63 0d | 43 6f 70 79 72 69 67 68 |cript.c.|Copyrigh|
|000000a0| 74 20 a9 20 31 39 39 31 | 2c 31 39 39 32 2c 31 39 |t . 1991|,1992,19|
|000000b0| 39 33 20 44 65 6e 69 73 | 20 47 2e 20 50 65 6c 6c |93 Denis| G. Pell|
|000000c0| 69 0d 0d 09 50 69 78 4d | 61 70 54 6f 50 6f 73 74 |i...PixM|apToPost|
|000000d0| 53 63 72 69 70 74 28 66 | 69 6c 65 6e 61 6d 65 2c |Script(f|ilename,|
|000000e0| 70 6d 2c 72 65 63 74 50 | 74 72 2c 70 61 67 65 52 |pm,rectP|tr,pageR|
|000000f0| 65 63 74 50 74 72 2c 63 | 65 6c 6c 73 50 65 72 49 |ectPtr,c|ellsPerI|
|00000100| 6e 63 68 2c 67 72 61 79 | 4c 65 76 65 6c 73 29 3b |nch,gray|Levels);|
|00000110| 0d 0d 09 54 68 69 73 20 | 69 73 20 61 20 73 69 6d |...This |is a sim|
|00000120| 70 6c 65 20 62 75 74 20 | 72 65 61 73 6f 6e 61 62 |ple but |reasonab|
|00000130| 6c 79 20 67 65 6e 65 72 | 61 6c 20 72 6f 75 74 69 |ly gener|al routi|
|00000140| 6e 65 20 74 6f 20 63 6f | 6e 76 65 72 74 20 61 20 |ne to co|nvert a |
|00000150| 67 72 61 79 73 63 61 6c | 65 0d 50 69 78 4d 61 70 |grayscal|e.PixMap|
|00000160| 20 74 6f 20 61 20 50 6f | 73 74 53 63 72 69 70 74 | to a Po|stScript|
|00000170| 20 66 69 6c 65 20 74 68 | 61 74 20 6d 61 79 20 62 | file th|at may b|
|00000180| 65 20 74 72 61 6e 73 6d | 69 74 74 65 64 20 74 6f |e transm|itted to|
|00000190| 20 61 20 4c 61 73 65 72 | 57 72 69 74 65 72 20 6f | a Laser|Writer o|
|000001a0| 72 20 4c 69 6e 6f 74 79 | 70 65 0d 74 6f 20 70 72 |r Linoty|pe.to pr|
|000001b0| 6f 64 75 63 65 20 61 20 | 68 61 6c 66 74 6f 6e 65 |oduce a |halftone|
|000001c0| 20 69 6d 61 67 65 20 6f | 6e 20 70 61 70 65 72 2e | image o|n paper.|
|000001d0| 20 57 65 20 75 73 65 20 | 69 74 20 61 20 6c 6f 74 | We use |it a lot|
|000001e0| 3b 20 69 74 20 77 6f 72 | 6b 73 20 77 65 6c 6c 2e |; it wor|ks well.|
|000001f0| 0d 09 54 68 65 20 66 69 | 6c 65 6e 61 6d 65 2c 20 |..The fi|lename, |
|00000200| 62 79 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 2c 20 73 |by conve|ntion, s|
|00000210| 68 6f 75 6c 64 20 65 6e | 64 20 69 6e 20 22 2e 70 |hould en|d in ".p|
|00000220| 73 22 20 74 6f 20 69 6e | 64 69 63 61 74 65 20 74 |s" to in|dicate t|
|00000230| 68 61 74 20 69 74 20 69 | 73 0d 61 20 70 6f 73 74 |hat it i|s.a post|
|00000240| 73 63 72 69 70 74 20 66 | 69 6c 65 2c 20 62 75 74 |script f|ile, but|
|00000250| 20 74 68 69 73 20 69 73 | 20 6e 6f 74 20 65 6e 66 | this is| not enf|
|00000260| 6f 72 63 65 64 2e 20 54 | 68 65 20 66 69 6c 65 27 |orced. T|he file'|
|00000270| 73 20 74 79 70 65 20 69 | 73 20 73 65 74 20 74 6f |s type i|s set to|
|00000280| 20 27 54 45 58 54 27 0d | 77 69 74 68 20 63 72 65 | 'TEXT'.|with cre|
|00000290| 61 74 6f 72 20 27 34 50 | 53 55 27 2c 20 73 6f 20 |ator '4P|SU', so |
|000002a0| 74 68 61 74 20 69 74 20 | 63 61 6e 20 62 65 20 64 |that it |can be d|
|000002b0| 6f 75 62 6c 65 2d 63 6c | 69 63 6b 65 64 20 74 6f |ouble-cl|icked to|
|000002c0| 20 6f 70 65 6e 20 6d 79 | 20 66 61 76 6f 72 69 74 | open my| favorit|
|000002d0| 65 0d 50 6f 73 74 53 63 | 72 69 70 74 20 64 6f 77 |e.PostSc|ript dow|
|000002e0| 6e 6c 6f 61 64 69 6e 67 | 20 70 72 6f 67 72 61 6d |nloading| program|
|000002f0| 2c 20 50 6f 73 74 48 61 | 73 74 65 2e 20 48 6f 77 |, PostHa|ste. How|
|00000300| 65 76 65 72 2c 20 69 74 | 27 73 20 61 20 70 6c 61 |ever, it|'s a pla|
|00000310| 69 6e 20 74 65 78 74 20 | 66 69 6c 65 20 73 6f 0d |in text |file so.|
|00000320| 61 6e 79 20 64 6f 77 6e | 6c 6f 61 64 65 72 20 77 |any down|loader w|
|00000330| 69 6c 6c 20 77 6f 72 6b | 2e 0d 09 54 68 65 20 50 |ill work|...The P|
|00000340| 69 78 4d 61 70 20 6d 75 | 73 74 20 68 61 76 65 20 |ixMap mu|st have |
|00000350| 38 20 62 69 74 73 20 70 | 65 72 20 70 69 78 65 6c |8 bits p|er pixel|
|00000360| 2e 20 4e 6f 20 63 6f 6c | 6f 72 20 74 61 62 6c 65 |. No col|or table|
|00000370| 73 20 61 72 65 20 75 73 | 65 64 2e 20 54 68 65 20 |s are us|ed. The |
|00000380| 72 61 77 0d 70 69 78 65 | 6c 20 76 61 6c 75 65 20 |raw.pixe|l value |
|00000390| 28 41 70 70 6c 65 20 63 | 61 6c 6c 73 20 69 74 20 |(Apple c|alls it |
|000003a0| 61 6e 20 22 69 6e 64 65 | 78 22 29 20 69 73 20 73 |an "inde|x") is s|
|000003b0| 65 6e 74 20 64 69 72 65 | 63 74 6c 79 20 74 6f 20 |ent dire|ctly to |
|000003c0| 74 68 65 20 70 72 69 6e | 74 65 72 20 77 69 74 68 |the prin|ter with|
|000003d0| 20 6e 6f 0d 74 72 61 6e | 73 66 6f 72 6d 61 74 69 | no.tran|sformati|
|000003e0| 6f 6e 2e 20 50 6f 73 74 | 53 63 72 69 70 74 20 61 |on. Post|Script a|
|000003f0| 73 73 75 6d 65 73 20 74 | 68 61 74 20 74 68 65 20 |ssumes t|hat the |
|00000400| 6e 75 6d 62 65 72 2c 20 | 66 72 6f 6d 20 30 20 74 |number, |from 0 t|
|00000410| 6f 20 32 35 35 20 69 73 | 0d 70 72 6f 70 6f 72 74 |o 255 is|.proport|
|00000420| 69 6f 6e 61 6c 20 74 6f | 20 64 65 73 69 72 65 64 |ional to| desired|
|00000430| 20 72 65 66 6c 65 63 74 | 61 6e 63 65 2c 20 66 72 | reflect|ance, fr|
|00000440| 6f 6d 20 7a 65 72 6f 20 | 74 6f 20 31 2e 20 54 68 |om zero |to 1. Th|
|00000450| 65 20 2a 72 65 63 74 50 | 74 72 20 69 6e 64 69 63 |e *rectP|tr indic|
|00000460| 61 74 65 73 20 77 68 61 | 74 0d 70 61 72 74 20 6f |ates wha|t.part o|
|00000470| 66 20 79 6f 75 72 20 50 | 69 78 4d 61 70 20 69 73 |f your P|ixMap is|
|00000480| 20 74 6f 20 62 65 20 75 | 73 65 64 2e 0d 09 54 68 | to be u|sed...Th|
|00000490| 65 20 2a 70 61 67 65 52 | 65 63 74 50 74 72 20 69 |e *pageR|ectPtr i|
|000004a0| 73 20 73 75 62 74 6c 65 | 2e 20 49 74 20 64 65 73 |s subtle|. It des|
|000004b0| 63 72 69 62 65 73 2c 20 | 69 6e 20 74 79 70 6f 67 |cribes, |in typog|
|000004c0| 72 61 70 68 65 72 73 20 | 70 6f 69 6e 74 73 0d 28 |raphers |points.(|
|000004d0| 31 2f 37 32 22 29 2c 20 | 74 68 65 20 72 65 63 74 |1/72"), |the rect|
|000004e0| 61 6e 67 6c 65 20 74 68 | 61 74 20 79 6f 75 72 20 |angle th|at your |
|000004f0| 69 6d 61 67 65 20 77 69 | 6c 6c 20 62 65 20 6d 61 |image wi|ll be ma|
|00000500| 70 70 65 64 20 6f 6e 74 | 6f 20 6f 6e 20 74 68 65 |pped ont|o on the|
|00000510| 20 70 72 69 6e 74 65 64 | 20 70 61 67 65 2e 0d 49 | printed| page..I|
|00000520| 74 20 69 73 20 65 73 73 | 65 6e 74 69 61 6c 20 74 |t is ess|ential t|
|00000530| 68 61 74 20 79 6f 75 20 | 6b 65 65 70 20 69 6e 20 |hat you |keep in |
|00000540| 6d 69 6e 64 20 74 68 61 | 74 20 41 70 70 6c 65 20 |mind tha|t Apple |
|00000550| 61 6e 64 20 41 64 6f 62 | 65 20 75 73 65 20 64 69 |and Adob|e use di|
|00000560| 66 66 65 72 65 6e 74 0d | 63 6f 6f 72 64 69 6e 61 |fferent.|coordina|
|00000570| 74 65 20 73 79 73 74 65 | 6d 73 2e 20 42 6f 74 68 |te syste|ms. Both|
|00000580| 20 41 70 70 6c 65 20 61 | 6e 64 20 41 64 6f 62 65 | Apple a|nd Adobe|
|00000590| 20 69 6e 63 72 65 61 73 | 65 20 78 20 66 72 6f 6d | increas|e x from|
|000005a0| 20 6c 65 66 74 20 74 6f | 20 72 69 67 68 74 2e 20 | left to| right. |
|000005b0| 48 6f 77 65 76 65 72 2c | 0d 41 70 70 6c 65 20 68 |However,|.Apple h|
|000005c0| 61 73 20 79 20 69 6e 63 | 72 65 61 73 69 6e 67 20 |as y inc|reasing |
|000005d0| 66 72 6f 6d 20 74 6f 70 | 20 74 6f 20 62 6f 74 74 |from top| to bott|
|000005e0| 6f 6d 2c 20 77 68 65 72 | 65 61 73 20 41 64 6f 62 |om, wher|eas Adob|
|000005f0| 65 20 69 6e 63 72 65 61 | 73 65 73 20 79 20 66 72 |e increa|ses y fr|
|00000600| 6f 6d 20 62 6f 74 74 6f | 6d 0d 74 6f 20 74 6f 70 |om botto|m.to top|
|00000610| 2e 20 41 64 6f 62 65 27 | 73 20 6f 72 69 67 69 6e |. Adobe'|s origin|
|00000620| 20 69 73 20 74 68 65 20 | 6c 6f 77 65 72 20 6c 65 | is the |lower le|
|00000630| 66 74 20 63 6f 72 6e 65 | 72 20 6f 66 20 74 68 65 |ft corne|r of the|
|00000640| 20 70 61 67 65 2c 20 65 | 76 65 6e 20 74 68 6f 75 | page, e|ven thou|
|00000650| 67 68 20 74 68 61 74 0d | 70 6f 69 6e 74 20 69 73 |gh that.|point is|
|00000660| 20 75 73 75 61 6c 6c 79 | 20 6e 6f 74 20 70 72 69 | usually| not pri|
|00000670| 6e 74 61 62 6c 65 2c 20 | 73 69 6e 63 65 20 6d 6f |ntable, |since mo|
|00000680| 73 74 20 70 72 69 6e 74 | 65 72 73 20 63 61 6e 20 |st print|ers can |
|00000690| 6f 6e 6c 79 20 70 72 69 | 6e 74 20 74 6f 20 77 69 |only pri|nt to wi|
|000006a0| 74 68 69 6e 0d 61 62 6f | 75 74 20 61 20 68 61 6c |thin.abo|ut a hal|
|000006b0| 66 20 69 6e 63 68 20 6f | 66 20 74 68 65 20 65 64 |f inch o|f the ed|
|000006c0| 67 65 2e 20 54 68 65 20 | 70 61 67 65 52 65 63 74 |ge. The |pageRect|
|000006d0| 2c 20 74 68 6f 75 67 68 | 20 73 75 70 70 6c 69 65 |, though| supplie|
|000006e0| 64 20 69 6e 20 41 70 70 | 6c 65 27 73 20 52 65 63 |d in App|le's Rec|
|000006f0| 74 0d 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t.data s|tructure|
|00000700| 2c 20 6d 75 73 74 20 62 | 65 20 69 6e 20 41 64 6f |, must b|e in Ado|
|00000710| 62 65 27 73 20 63 6f 6f | 72 64 69 6e 61 74 65 73 |be's coo|rdinates|
|00000720| 2c 20 72 65 73 70 65 63 | 74 69 6e 67 20 74 68 65 |, respec|ting the|
|00000730| 20 6e 61 6d 65 73 20 6f | 66 20 74 68 65 20 52 65 | names o|f the Re|
|00000740| 63 74 0d 73 74 72 75 63 | 74 75 72 65 27 73 20 66 |ct.struc|ture's f|
|00000750| 69 65 6c 64 73 3a 20 6c | 65 66 74 2c 20 74 6f 70 |ields: l|eft, top|
|00000760| 2c 20 72 69 67 68 74 2c | 20 62 6f 74 74 6f 6d 2e |, right,| bottom.|
|00000770| 20 53 6f 2c 20 66 6f 72 | 20 61 6e 20 69 6d 61 67 | So, for| an imag|
|00000780| 65 20 74 6f 20 66 69 6c | 6c 20 6d 6f 73 74 20 6f |e to fil|l most o|
|00000790| 66 0d 61 6e 20 38 2e 35 | 78 31 31 20 70 61 67 65 |f.an 8.5|x11 page|
|000007a0| 2c 20 77 69 74 68 20 30 | 2e 35 22 20 6d 61 72 67 |, with 0|.5" marg|
|000007b0| 69 6e 73 2c 20 79 6f 75 | 20 6d 69 67 68 74 20 75 |ins, you| might u|
|000007c0| 73 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |se the f|ollowing|
|000007d0| 3a 0d 0d 09 09 53 65 74 | 52 65 63 74 28 26 70 61 |:....Set|Rect(&pa|
|000007e0| 67 65 52 65 63 74 2c 30 | 2e 35 2a 37 32 2c 31 30 |geRect,0|.5*72,10|
|000007f0| 2e 35 2a 37 32 2c 38 2a | 37 32 2c 30 2e 35 2a 37 |.5*72,8*|72,0.5*7|
|00000800| 32 29 3b 0d 0d 09 49 6e | 20 70 72 69 6e 74 69 6e |2);...In| printin|
|00000810| 67 20 50 6f 73 74 53 63 | 72 69 70 74 20 68 61 6c |g PostSc|ript hal|
|00000820| 66 74 6f 6e 65 73 20 74 | 68 65 20 68 61 6c 66 74 |ftones t|he halft|
|00000830| 6f 6e 65 20 63 65 6c 6c | 20 73 69 7a 65 20 64 65 |one cell| size de|
|00000840| 74 65 72 6d 69 6e 65 73 | 20 62 6f 74 68 0d 74 68 |termines| both.th|
|00000850| 65 20 73 70 61 74 69 61 | 6c 20 61 6e 64 20 67 72 |e spatia|l and gr|
|00000860| 61 79 6c 65 76 65 6c 20 | 72 65 73 6f 6c 75 74 69 |aylevel |resoluti|
|00000870| 6f 6e 73 20 6f 66 20 74 | 68 65 20 72 65 73 75 6c |ons of t|he resul|
|00000880| 74 69 6e 67 20 69 6d 61 | 67 65 2e 20 46 6f 72 20 |ting ima|ge. For |
|00000890| 74 68 65 20 63 6f 6e 76 | 65 6e 69 65 6e 63 65 0d |the conv|enience.|
|000008a0| 6f 66 20 74 68 65 20 75 | 73 65 72 20 74 68 69 73 |of the u|ser this|
|000008b0| 20 63 61 6e 20 62 65 20 | 73 70 65 63 69 66 69 65 | can be |specifie|
|000008c0| 64 20 62 79 20 73 65 74 | 74 69 6e 67 20 65 69 74 |d by set|ting eit|
|000008d0| 68 65 72 20 74 68 65 20 | 63 65 6c 6c 73 50 65 72 |her the |cellsPer|
|000008e0| 49 6e 63 68 20 6f 72 20 | 74 68 65 0d 67 72 61 79 |Inch or |the.gray|
|000008f0| 4c 65 76 65 6c 73 20 61 | 72 67 75 6d 65 6e 74 20 |Levels a|rgument |
|00000900| 74 6f 20 74 68 65 20 64 | 65 73 69 72 65 64 20 76 |to the d|esired v|
|00000910| 61 6c 75 65 3b 20 74 68 | 65 20 6f 74 68 65 72 20 |alue; th|e other |
|00000920| 6f 6e 65 20 73 68 6f 75 | 6c 64 20 62 65 20 7a 65 |one shou|ld be ze|
|00000930| 72 6f 2e 20 49 66 20 62 | 6f 74 68 0d 61 72 65 20 |ro. If b|oth.are |
|00000940| 7a 65 72 6f 20 74 68 65 | 6e 20 74 68 65 20 70 72 |zero the|n the pr|
|00000950| 69 6e 74 65 72 20 77 69 | 6c 6c 20 62 65 20 6c 65 |inter wi|ll be le|
|00000960| 66 74 20 61 74 20 69 74 | 73 20 64 65 66 61 75 6c |ft at it|s defaul|
|00000970| 74 20 63 65 6c 6c 20 73 | 69 7a 65 2c 20 77 68 69 |t cell s|ize, whi|
|00000980| 63 68 20 69 73 0d 75 73 | 75 61 6c 6c 79 20 61 20 |ch is.us|ually a |
|00000990| 67 6f 6f 64 20 63 68 6f | 69 63 65 2e 20 4e 6f 74 |good cho|ice. Not|
|000009a0| 65 20 74 68 61 74 20 74 | 68 65 72 65 20 6e 65 65 |e that t|here nee|
|000009b0| 64 20 6e 6f 74 20 62 65 | 20 61 6e 79 20 70 61 72 |d not be| any par|
|000009c0| 74 69 63 75 6c 61 72 20 | 63 6f 72 72 65 73 70 6f |ticular |correspo|
|000009d0| 6e 64 65 6e 63 65 0d 62 | 65 74 77 65 65 6e 20 70 |ndence.b|etween p|
|000009e0| 69 78 65 6c 73 20 69 6e | 20 79 6f 75 72 20 69 6d |ixels in| your im|
|000009f0| 61 67 65 20 61 6e 64 20 | 63 65 6c 6c 73 20 69 6e |age and |cells in|
|00000a00| 20 74 68 65 20 68 61 6c | 66 74 6f 6e 65 3b 20 74 | the hal|ftone; t|
|00000a10| 68 65 20 70 72 69 6e 74 | 65 72 0d 61 75 74 6f 6d |he print|er.autom|
|00000a20| 61 74 69 63 61 6c 6c 79 | 20 72 65 73 61 6d 70 6c |atically| resampl|
|00000a30| 65 73 20 79 6f 75 72 20 | 69 6d 61 67 65 20 74 6f |es your |image to|
|00000a40| 20 70 72 6f 64 75 63 65 | 20 74 68 65 20 68 61 6c | produce| the hal|
|00000a50| 66 74 6f 6e 65 2e 0d 09 | 49 66 20 79 6f 75 20 73 |ftone...|If you s|
|00000a60| 65 74 20 63 65 6c 6c 73 | 50 65 72 49 6e 63 68 20 |et cells|PerInch |
|00000a70| 74 6f 20 61 20 6e 6f 6e | 7a 65 72 6f 20 76 61 6c |to a non|zero val|
|00000a80| 75 65 20 74 68 65 6e 20 | 74 68 65 20 70 72 69 6e |ue then |the prin|
|00000a90| 74 65 72 20 77 69 6c 6c | 20 62 65 0d 61 73 6b 65 |ter will| be.aske|
|00000aa0| 64 20 74 6f 20 70 72 69 | 6e 74 20 69 74 73 20 68 |d to pri|nt its h|
|00000ab0| 61 6c 66 74 6f 6e 65 20 | 77 69 74 68 20 74 68 61 |alftone |with tha|
|00000ac0| 74 20 6d 61 6e 79 20 68 | 61 6c 66 74 6f 6e 65 20 |t many h|alftone |
|00000ad0| 63 65 6c 6c 73 20 70 65 | 72 20 69 6e 63 68 2e 20 |cells pe|r inch. |
|00000ae0| 45 2e 67 2e 20 74 6f 0d | 70 72 6f 64 75 63 65 20 |E.g. to.|produce |
|00000af0| 61 20 68 61 6c 66 74 6f | 6e 65 20 6f 72 69 67 69 |a halfto|ne origi|
|00000b00| 6e 61 6c 20 66 6f 72 20 | 73 75 62 73 65 71 75 65 |nal for |subseque|
|00000b10| 6e 74 20 6f 6e 65 2d 74 | 6f 2d 6f 6e 65 20 72 65 |nt one-t|o-one re|
|00000b20| 70 72 6f 64 75 63 74 69 | 6f 6e 20 69 6e 20 61 20 |producti|on in a |
|00000b30| 6a 6f 75 72 6e 61 6c 2c | 0d 79 6f 75 27 6c 6c 20 |journal,|.you'll |
|00000b40| 77 61 6e 74 20 74 68 65 | 20 63 65 6c 6c 73 20 74 |want the| cells t|
|00000b50| 6f 20 62 65 20 63 6f 61 | 72 73 65 20 65 6e 6f 75 |o be coa|rse enou|
|00000b60| 67 68 20 66 6f 72 20 74 | 68 65 6d 20 74 6f 20 72 |gh for t|hem to r|
|00000b70| 65 70 72 6f 64 75 63 65 | 20 77 69 74 68 6f 75 74 |eproduce| without|
|00000b80| 0d 72 65 2d 73 63 72 65 | 65 6e 69 6e 67 2c 20 65 |.re-scre|ening, e|
|00000b90| 2e 67 2e 20 31 30 30 20 | 63 65 6c 6c 73 20 70 65 |.g. 100 |cells pe|
|00000ba0| 72 20 69 6e 63 68 2e 0d | 09 41 6c 74 65 72 6e 61 |r inch..|.Alterna|
|00000bb0| 74 69 76 65 6c 79 2c 20 | 69 66 20 79 6f 75 20 73 |tively, |if you s|
|00000bc0| 65 74 20 67 72 61 79 4c | 65 76 65 6c 73 20 74 6f |et grayL|evels to|
|00000bd0| 20 61 20 6e 6f 6e 7a 65 | 72 6f 20 76 61 6c 75 65 | a nonze|ro value|
|00000be0| 20 74 68 65 6e 20 74 68 | 65 20 70 72 69 6e 74 65 | then th|e printe|
|00000bf0| 72 0d 77 69 6c 6c 20 62 | 65 20 61 73 6b 65 64 20 |r.will b|e asked |
|00000c00| 74 6f 20 70 72 69 6e 74 | 20 69 74 73 20 68 61 6c |to print| its hal|
|00000c10| 66 74 6f 6e 65 20 77 69 | 74 68 20 63 65 6c 6c 73 |ftone wi|th cells|
|00000c20| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 67 72 61 79 | contain|ing gray|
|00000c30| 4c 65 76 65 6c 73 2d 31 | 20 70 72 69 6e 74 65 72 |Levels-1| printer|
|00000c40| 0d 70 69 78 65 6c 73 2c | 20 79 69 65 6c 64 69 6e |.pixels,| yieldin|
|00000c50| 67 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |g the sp|ecified |
|00000c60| 6e 75 6d 62 65 72 20 6f | 66 20 67 72 61 79 20 6c |number o|f gray l|
|00000c70| 65 76 65 6c 73 2e 20 45 | 2e 67 2e 20 79 6f 75 20 |evels. E|.g. you |
|00000c80| 6d 69 67 68 74 20 77 61 | 6e 74 20 74 6f 0d 66 6f |might wa|nt to.fo|
|00000c90| 72 63 65 20 79 6f 75 72 | 20 33 30 30 20 64 70 69 |rce your| 300 dpi|
|00000ca0| 20 4c 61 73 65 72 57 72 | 69 74 65 72 20 74 6f 20 | LaserWr|iter to |
|00000cb0| 75 73 65 20 62 69 67 20 | 63 65 6c 6c 73 20 79 69 |use big |cells yi|
|00000cc0| 65 6c 64 69 6e 67 20 32 | 35 36 20 67 72 61 79 20 |elding 2|56 gray |
|00000cd0| 6c 65 76 65 6c 73 2e 0d | 09 59 6f 75 20 73 68 6f |levels..|.You sho|
|00000ce0| 75 6c 64 20 72 65 6d 6f | 76 65 28 29 20 61 6e 79 |uld remo|ve() any|
|00000cf0| 20 70 72 65 2d 65 78 69 | 73 74 69 6e 67 20 6f 6c | pre-exi|sting ol|
|00000d00| 64 20 66 69 6c 65 20 6f | 66 20 74 68 65 20 73 61 |d file o|f the sa|
|00000d10| 6d 65 20 6e 61 6d 65 2c | 20 75 6e 6c 65 73 73 0d |me name,| unless.|
|00000d20| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 61 70 70 65 |you want| to appe|
|00000d30| 6e 64 20 74 6f 20 69 74 | 2e 20 50 69 78 4d 61 70 |nd to it|. PixMap|
|00000d40| 54 6f 50 6f 73 74 53 63 | 72 69 70 74 20 61 6c 77 |ToPostSc|ript alw|
|00000d50| 61 79 73 20 61 70 70 65 | 6e 64 73 20 74 6f 20 61 |ays appe|nds to a|
|00000d60| 6e 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 0d |n existi|ng file.|
|00000d70| 77 69 74 68 20 74 68 65 | 20 73 61 6d 65 20 6e 61 |with the| same na|
|00000d80| 6d 65 2c 20 69 66 20 6f | 6e 65 20 65 78 69 73 74 |me, if o|ne exist|
|00000d90| 73 2c 20 74 6f 20 61 6c | 6c 6f 77 20 79 6f 75 20 |s, to al|low you |
|00000da0| 74 6f 20 70 6c 61 63 65 | 20 73 65 76 65 72 61 6c |to place| several|
|00000db0| 20 69 6d 61 67 65 73 20 | 6f 6e 74 6f 20 61 0d 70 | images |onto a.p|
|00000dc0| 61 67 65 2e 20 28 59 6f | 75 20 73 68 6f 75 6c 64 |age. (Yo|u should|
|00000dd0| 20 6f 66 66 73 65 74 20 | 74 68 65 69 72 20 70 61 | offset |their pa|
|00000de0| 67 65 52 65 63 74 73 20 | 75 6e 6c 65 73 73 20 79 |geRects |unless y|
|00000df0| 6f 75 20 77 61 6e 74 20 | 74 68 65 20 69 6d 61 67 |ou want |the imag|
|00000e00| 65 73 20 74 6f 0d 73 75 | 70 65 72 69 6d 70 6f 73 |es to.su|perimpos|
|00000e10| 65 2e 29 0d 09 59 6f 75 | 20 77 69 6c 6c 20 6e 65 |e.)..You| will ne|
|00000e20| 65 64 20 74 6f 20 61 64 | 64 20 61 20 22 73 68 6f |ed to ad|d a "sho|
|00000e30| 77 70 61 67 65 5c 6e 22 | 20 63 6f 6d 6d 61 6e 64 |wpage\n"| command|
|00000e40| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | at the |end of t|
|00000e50| 68 65 20 70 6f 73 74 73 | 63 72 69 70 74 0d 66 69 |he posts|cript.fi|
|00000e60| 6c 65 2e 20 54 68 69 73 | 20 69 73 20 74 68 65 20 |le. This| is the |
|00000e70| 63 6f 6d 6d 61 6e 64 20 | 74 68 61 74 20 74 65 6c |command |that tel|
|00000e80| 6c 73 20 74 68 65 20 70 | 72 69 6e 74 65 72 20 74 |ls the p|rinter t|
|00000e90| 6f 20 67 6f 20 61 68 65 | 61 64 20 61 6e 64 20 70 |o go ahe|ad and p|
|00000ea0| 72 69 6e 74 0d 74 68 65 | 20 70 61 67 65 2e 20 55 |rint.the| page. U|
|00000eb0| 73 65 20 74 68 65 20 73 | 75 62 72 6f 75 74 69 6e |se the s|ubroutin|
|00000ec0| 65 20 41 70 70 65 6e 64 | 54 6f 46 69 6c 65 28 66 |e Append|ToFile(f|
|00000ed0| 69 6c 65 6e 61 6d 65 2c | 22 73 68 6f 77 70 61 67 |ilename,|"showpag|
|00000ee0| 65 5c 6e 22 29 2c 20 73 | 75 70 70 6c 69 65 64 20 |e\n"), s|upplied |
|00000ef0| 66 6f 72 20 74 68 69 73 | 0d 70 75 72 70 6f 73 65 |for this|.purpose|
|00000f00| 2e 20 4e 61 74 75 72 61 | 6c 6c 79 2c 20 79 6f 75 |. Natura|lly, you|
|00000f10| 20 63 6f 75 6c 64 20 61 | 6c 73 6f 20 75 73 65 20 | could a|lso use |
|00000f20| 74 6f 20 74 68 69 73 20 | 74 6f 20 61 64 64 20 79 |to this |to add y|
|00000f30| 6f 75 72 20 6f 77 6e 20 | 70 6f 73 74 73 63 72 69 |our own |postscri|
|00000f40| 70 74 0d 63 6f 6d 6d 61 | 6e 64 73 20 62 65 66 6f |pt.comma|nds befo|
|00000f50| 72 65 20 6f 72 20 61 66 | 74 65 72 20 74 68 65 20 |re or af|ter the |
|00000f60| 69 6d 61 67 69 6e 67 20 | 63 6f 64 65 20 69 6e 73 |imaging |code ins|
|00000f70| 65 72 74 65 64 20 62 79 | 20 50 69 78 4d 61 70 54 |erted by| PixMapT|
|00000f80| 6f 50 6f 73 74 53 63 72 | 69 70 74 2e 0d 09 48 65 |oPostScr|ipt...He|
|00000f90| 72 65 27 73 20 61 20 6d | 69 6e 69 6d 61 6c 20 65 |re's a m|inimal e|
|00000fa0| 78 61 6d 70 6c 65 20 6f | 66 20 74 68 65 20 74 68 |xample o|f the th|
|00000fb0| 72 65 65 20 63 6f 6d 6d | 61 6e 64 73 3a 0d 0d 09 |ree comm|ands:...|
|00000fc0| 09 72 65 6d 6f 76 65 28 | 22 74 65 73 74 2e 70 73 |.remove(|"test.ps|
|00000fd0| 22 29 3b 0d 09 09 50 69 | 78 4d 61 70 54 6f 50 6f |");...Pi|xMapToPo|
|00000fe0| 73 74 53 63 72 69 70 74 | 28 22 74 65 73 74 2e 70 |stScript|("test.p|
|00000ff0| 73 22 2c 70 69 78 4d 61 | 70 48 61 6e 64 6c 65 2c |s",pixMa|pHandle,|
|00001000| 26 72 65 63 74 2c 26 70 | 61 67 65 52 65 63 74 2c |&rect,&p|ageRect,|
|00001010| 30 2e 30 2c 30 29 3b 0d | 09 09 41 70 70 65 6e 64 |0.0,0);.|..Append|
|00001020| 54 6f 46 69 6c 65 28 22 | 74 65 73 74 2e 70 73 22 |ToFile("|test.ps"|
|00001030| 2c 22 73 68 6f 77 70 61 | 67 65 5c 6e 22 29 3b 0d |,"showpa|ge\n");.|
|00001040| 0d 09 54 6f 20 70 72 69 | 6e 74 20 61 20 73 63 72 |..To pri|nt a scr|
|00001050| 65 65 6e 20 74 6f 20 64 | 69 73 6b 2c 20 70 72 65 |een to d|isk, pre|
|00001060| 73 65 72 76 69 6e 67 20 | 74 68 65 20 73 69 7a 65 |serving |the size|
|00001070| 20 61 6e 64 20 73 63 61 | 6c 65 20 6f 66 20 74 68 | and sca|le of th|
|00001080| 65 20 69 6d 61 67 65 2c | 0d 74 72 79 20 74 68 69 |e image,|.try thi|
|00001090| 73 3a 0d 0d 09 09 72 65 | 6d 6f 76 65 28 22 74 65 |s:....re|move("te|
|000010a0| 73 74 2e 70 73 22 29 3b | 0d 09 09 70 61 67 65 52 |st.ps");|...pageR|
|000010b0| 65 63 74 3d 77 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |ect=wind|ow->port|
|000010c0| 52 65 63 74 3b 0d 09 09 | 70 61 67 65 52 65 63 74 |Rect;...|pageRect|
|000010d0| 2e 74 6f 70 2a 3d 2d 31 | 3b 09 09 2f 2f 20 63 6f |.top*=-1|;..// co|
|000010e0| 6e 76 65 72 74 20 66 72 | 6f 6d 20 41 70 70 6c 65 |nvert fr|om Apple|
|000010f0| 20 74 6f 20 41 64 6f 62 | 65 20 63 6f 6f 72 64 69 | to Adob|e coordi|
|00001100| 6e 61 74 65 73 0d 09 09 | 70 61 67 65 52 65 63 74 |nates...|pageRect|
|00001110| 2e 62 6f 74 74 6f 6d 2a | 3d 2d 31 3b 09 2f 2f 20 |.bottom*|=-1;.// |
|00001120| 63 6f 6e 76 65 72 74 20 | 66 72 6f 6d 20 41 70 70 |convert |from App|
|00001130| 6c 65 20 74 6f 20 41 64 | 6f 62 65 20 63 6f 6f 72 |le to Ad|obe coor|
|00001140| 64 69 6e 61 74 65 73 0d | 09 09 53 65 74 52 65 63 |dinates.|..SetRec|
|00001150| 74 28 26 70 61 70 65 72 | 52 65 63 74 2c 30 2c 31 |t(&paper|Rect,0,1|
|00001160| 31 2a 37 32 2c 38 2e 35 | 2a 37 32 2c 30 29 3b 0d |1*72,8.5|*72,0);.|
|00001170| 09 09 43 65 6e 74 65 72 | 52 65 63 74 49 6e 52 65 |..Center|RectInRe|
|00001180| 63 74 28 26 70 61 67 65 | 52 65 63 74 2c 26 70 61 |ct(&page|Rect,&pa|
|00001190| 70 65 72 52 65 63 74 29 | 3b 0d 09 09 50 69 78 4d |perRect)|;...PixM|
|000011a0| 61 70 54 6f 50 6f 73 74 | 53 63 72 69 70 74 28 22 |apToPost|Script("|
|000011b0| 74 65 73 74 2e 70 73 22 | 2c 77 69 6e 64 6f 77 2d |test.ps"|,window-|
|000011c0| 3e 70 6f 72 74 50 69 78 | 4d 61 70 2c 26 77 69 6e |>portPix|Map,&win|
|000011d0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2c 26 70 |dow->por|tRect,&p|
|000011e0| 61 67 65 52 65 63 74 2c | 30 2c 30 29 3b 0d 09 09 |ageRect,|0,0);...|
|000011f0| 41 70 70 65 6e 64 54 6f | 46 69 6c 65 28 22 74 65 |AppendTo|File("te|
|00001200| 73 74 2e 70 73 22 2c 22 | 73 68 6f 77 70 61 67 65 |st.ps","|showpage|
|00001210| 5c 6e 22 29 3b 0d 0d 09 | 54 69 6c 69 6e 67 20 69 |\n");...|Tiling i|
|00001220| 73 20 73 6f 6d 65 74 68 | 69 6e 67 20 77 65 20 6f |s someth|ing we o|
|00001230| 66 74 65 6e 20 77 61 6e | 74 20 74 6f 20 64 6f 2c |ften wan|t to do,|
|00001240| 20 63 72 65 61 74 69 6e | 67 20 61 20 68 75 67 65 | creatin|g a huge|
|00001250| 20 69 6d 61 67 65 20 62 | 79 20 74 61 70 69 6e 67 | image b|y taping|
|00001260| 0d 6d 61 6e 79 20 70 61 | 67 65 73 20 74 6f 67 65 |.many pa|ges toge|
|00001270| 74 68 65 72 2e 20 59 6f | 75 20 61 63 63 6f 6d 70 |ther. Yo|u accomp|
|00001280| 6c 69 73 68 20 74 68 69 | 73 20 62 79 20 72 65 70 |lish thi|s by rep|
|00001290| 65 61 74 65 64 6c 79 20 | 70 72 69 6e 74 69 6e 67 |eatedly |printing|
|000012a0| 20 74 68 65 20 68 75 67 | 65 0d 69 6d 61 67 65 2d | the hug|e.image-|
|000012b0| 2d 6f 6e 6c 79 20 6f 6e | 65 20 70 61 67 65 66 75 |-only on|e pagefu|
|000012c0| 6c 20 61 70 70 65 61 72 | 73 20 65 61 63 68 20 74 |l appear|s each t|
|000012d0| 69 6d 65 2d 2d 73 68 69 | 66 74 69 6e 67 20 74 68 |ime--shi|fting th|
|000012e0| 65 20 69 6d 61 67 65 20 | 73 6f 20 74 68 61 74 20 |e image |so that |
|000012f0| 65 76 65 6e 74 75 61 6c | 6c 79 0d 65 76 65 72 79 |eventual|ly.every|
|00001300| 20 62 69 74 20 68 61 73 | 20 62 65 65 6e 20 70 72 | bit has| been pr|
|00001310| 69 6e 74 65 64 2e 20 28 | 49 74 27 73 20 73 6c 6f |inted. (|It's slo|
|00001320| 77 2c 20 73 69 6e 63 65 | 20 74 68 65 20 77 68 6f |w, since| the who|
|00001330| 6c 65 20 69 6d 61 67 65 | 20 69 73 0d 74 72 61 6e |le image| is.tran|
|00001340| 73 6d 69 74 74 65 64 20 | 74 6f 20 74 68 65 20 70 |smitted |to the p|
|00001350| 72 69 6e 74 65 72 20 65 | 61 63 68 20 74 69 6d 65 |rinter e|ach time|
|00001360| 2e 29 20 48 65 72 65 27 | 73 20 61 6e 20 65 78 61 |.) Here'|s an exa|
|00001370| 6d 70 6c 65 20 74 68 61 | 74 20 63 72 65 61 74 65 |mple tha|t create|
|00001380| 73 20 61 20 62 69 67 20 | 22 77 69 64 74 68 22 0d |s a big |"width".|
|00001390| 62 79 20 22 68 65 69 67 | 68 74 22 20 69 6d 61 67 |by "heig|ht" imag|
|000013a0| 65 2e 20 57 65 20 74 69 | 6c 65 20 6f 6e 74 6f 20 |e. We ti|le onto |
|000013b0| 6d 75 6c 74 69 70 6c 65 | 20 38 2e 35 22 78 31 31 |multiple| 8.5"x11|
|000013c0| 22 20 70 61 67 65 73 2c | 20 75 73 69 6e 67 20 37 |" pages,| using 7|
|000013d0| 2e 35 22 78 31 30 22 20 | 6f 66 20 65 61 63 68 0d |.5"x10" |of each.|
|000013e0| 70 61 67 65 2c 20 61 6c | 6c 6f 77 69 6e 67 20 66 |page, al|lowing f|
|000013f0| 6f 72 20 30 2e 35 22 20 | 6e 6f 6e 70 72 69 6e 74 |or 0.5" |nonprint|
|00001400| 69 6e 67 20 6d 61 72 67 | 69 6e 73 3a 0d 0d 09 09 |ing marg|ins:....|
|00001410| 72 65 6d 6f 76 65 28 22 | 74 65 73 74 2e 70 73 22 |remove("|test.ps"|
|00001420| 29 3b 0d 09 09 53 65 74 | 52 65 63 74 28 26 6d 6f |);...Set|Rect(&mo|
|00001430| 73 61 69 63 52 65 63 74 | 2c 30 2c 68 65 69 67 68 |saicRect|,0,heigh|
|00001440| 74 2c 77 69 64 74 68 2c | 30 29 3b 09 2f 2f 20 49 |t,width,|0);.// I|
|00001450| 6e 20 75 6e 69 74 73 20 | 6f 66 20 22 70 6f 69 6e |n units |of "poin|
|00001460| 74 73 22 2e 20 37 32 20 | 70 6f 69 6e 74 73 2f 69 |ts". 72 |points/i|
|00001470| 6e 63 68 2e 0d 09 09 4f | 66 66 73 65 74 52 65 63 |nch....O|ffsetRec|
|00001480| 74 28 26 6d 6f 73 61 69 | 63 52 65 63 74 2c 30 2e |t(&mosai|cRect,0.|
|00001490| 35 2a 37 32 2c 30 2e 35 | 2a 37 32 29 3b 09 2f 2f |5*72,0.5|*72);.//|
|000014a0| 20 61 6c 6c 6f 77 20 66 | 6f 72 20 6e 6f 6e 70 72 | allow f|or nonpr|
|000014b0| 69 6e 74 69 6e 67 20 6d | 61 72 67 69 6e 0d 09 09 |inting m|argin...|
|000014c0| 66 6f 72 28 69 3d 30 3b | 69 3c 77 69 64 74 68 3b |for(i=0;|i<width;|
|000014d0| 69 2b 3d 37 2e 35 2a 37 | 32 29 66 6f 72 28 6a 3d |i+=7.5*7|2)for(j=|
|000014e0| 30 3b 6a 3c 68 65 69 67 | 68 74 3b 6a 2b 3d 31 30 |0;j<heig|ht;j+=10|
|000014f0| 2a 37 32 29 7b 0d 09 09 | 09 70 61 67 65 52 65 63 |*72){...|.pageRec|
|00001500| 74 3d 6d 6f 73 61 69 63 | 52 65 63 74 3b 0d 09 09 |t=mosaic|Rect;...|
|00001510| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 70 61 67 |.OffsetR|ect(&pag|
|00001520| 65 52 65 63 74 2c 2d 69 | 2c 2d 6a 29 3b 0d 09 09 |eRect,-i|,-j);...|
|00001530| 09 50 69 78 4d 61 70 54 | 6f 50 6f 73 74 53 63 72 |.PixMapT|oPostScr|
|00001540| 69 70 74 28 22 74 65 73 | 74 2e 70 73 22 2c 70 69 |ipt("tes|t.ps",pi|
|00001550| 78 4d 61 70 48 61 6e 64 | 6c 65 2c 26 72 65 63 74 |xMapHand|le,&rect|
|00001560| 2c 26 70 61 67 65 52 65 | 63 74 2c 30 2e 30 2c 30 |,&pageRe|ct,0.0,0|
|00001570| 29 3b 0d 09 09 09 41 70 | 70 65 6e 64 54 6f 46 69 |);....Ap|pendToFi|
|00001580| 6c 65 28 22 74 65 73 74 | 2e 70 73 22 2c 22 73 68 |le("test|.ps","sh|
|00001590| 6f 77 70 61 67 65 5c 6e | 22 29 3b 0d 09 09 7d 0d |owpage\n|");...}.|
|000015a0| 0d 09 49 6e 20 63 61 73 | 65 20 79 6f 75 72 20 50 |..In cas|e your P|
|000015b0| 6f 73 74 53 63 72 69 70 | 74 20 6d 61 6e 75 61 6c |ostScrip|t manual|
|000015c0| 20 69 73 6e 27 74 20 68 | 61 6e 64 79 2c 20 74 68 | isn't h|andy, th|
|000015d0| 65 20 65 61 73 79 20 77 | 61 79 20 74 6f 20 6f 62 |e easy w|ay to ob|
|000015e0| 74 61 69 6e 0d 6d 75 6c | 74 69 70 6c 65 20 63 6f |tain.mul|tiple co|
|000015f0| 70 69 65 73 20 6f 66 20 | 65 61 63 68 20 70 61 67 |pies of |each pag|
|00001600| 65 20 69 73 20 74 6f 20 | 75 73 65 20 74 68 65 20 |e is to |use the |
|00001610| 23 63 6f 70 69 65 73 20 | 76 61 72 69 61 62 6c 65 |#copies |variable|
|00001620| 20 74 68 61 74 27 73 20 | 62 75 69 6c 74 20 69 6e | that's |built in|
|00001630| 74 6f 0d 50 6f 73 74 73 | 63 72 69 70 74 2e 20 41 |to.Posts|cript. A|
|00001640| 6e 79 77 68 65 72 65 20 | 69 6e 20 79 6f 75 72 20 |nywhere |in your |
|00001650| 66 69 6c 65 20 62 65 66 | 6f 72 65 20 22 73 68 6f |file bef|ore "sho|
|00001660| 77 70 61 67 65 22 2c 20 | 73 65 74 20 23 63 6f 70 |wpage", |set #cop|
|00001670| 69 65 73 20 74 6f 20 74 | 68 65 20 64 65 73 69 72 |ies to t|he desir|
|00001680| 65 64 0d 76 61 6c 75 65 | 2e 20 45 2e 67 2e 0d 0d |ed.value|. E.g...|
|00001690| 09 09 41 70 70 65 6e 64 | 54 6f 46 69 6c 65 28 22 |..Append|ToFile("|
|000016a0| 74 65 73 74 2e 70 73 22 | 2c 22 2f 23 63 6f 70 69 |test.ps"|,"/#copi|
|000016b0| 65 73 20 33 20 64 65 66 | 5c 6e 22 29 3b 0d 09 09 |es 3 def|\n");...|
|000016c0| 0d 09 54 68 65 72 65 20 | 61 72 65 20 6d 61 6e 79 |..There |are many|
|000016d0| 20 66 72 65 65 20 50 6f | 73 74 53 63 72 69 70 74 | free Po|stScript|
|000016e0| 20 64 6f 77 6e 6c 6f 61 | 64 65 72 73 2c 20 62 75 | downloa|ders, bu|
|000016f0| 74 20 49 20 66 69 6e 64 | 20 74 68 65 6d 20 63 6c |t I find| them cl|
|00001700| 75 6d 73 79 20 74 6f 0d | 75 73 65 2c 20 65 73 70 |umsy to.|use, esp|
|00001710| 65 63 69 61 6c 6c 79 20 | 74 68 65 20 6f 6e 65 73 |ecially |the ones|
|00001720| 20 74 68 61 74 20 64 6f | 6e 27 74 20 69 6e 66 6f | that do|n't info|
|00001730| 72 6d 20 79 6f 75 20 6f | 66 20 65 72 72 6f 72 73 |rm you o|f errors|
|00001740| 2c 20 73 68 6f 75 6c 64 | 20 74 68 65 79 20 6f 63 |, should| they oc|
|00001750| 63 75 72 2e 20 49 0d 62 | 6f 75 67 68 74 20 61 6e |cur. I.b|ought an|
|00001760| 64 20 75 73 65 0d 0d 42 | 42 45 64 69 74 20 28 63 |d use..B|BEdit (c|
|00001770| 6f 6d 65 73 20 77 69 74 | 68 20 61 6e 20 65 78 74 |omes wit|h an ext|
|00001780| 65 6e 73 69 6f 6e 20 66 | 6f 72 20 64 6f 77 6e 6c |ension f|or downl|
|00001790| 6f 61 64 69 6e 67 20 70 | 6f 73 74 73 63 72 69 70 |oading p|ostscrip|
|000017a0| 74 2d 2d 69 20 64 6f 6e | 27 74 20 6b 6e 6f 77 20 |t--i don|'t know |
|000017b0| 69 66 20 69 74 20 72 65 | 70 6f 72 74 73 20 65 72 |if it re|ports er|
|000017c0| 72 6f 72 73 29 0d 0d 50 | 6f 73 74 48 61 73 74 65 |rors)..P|ostHaste|
|000017d0| 20 28 61 6c 61 73 2c 20 | 69 74 27 73 20 6e 6f 74 | (alas, |it's not|
|000017e0| 20 33 32 2d 62 69 74 20 | 63 6c 65 61 6e 2c 20 61 | 32-bit |clean, a|
|000017f0| 6e 64 20 74 68 75 73 20 | 69 73 20 6e 6f 20 6c 6f |nd thus |is no lo|
|00001800| 6e 67 65 72 20 75 73 61 | 62 6c 65 29 0d 66 72 6f |nger usa|ble).fro|
|00001810| 6d 3a 0d 4d 69 63 72 6f | 20 44 79 6e 61 6d 69 63 |m:.Micro| Dynamic|
|00001820| 73 2c 20 4c 74 64 2e 0d | 38 35 35 35 20 31 36 74 |s, Ltd..|8555 16t|
|00001830| 68 20 53 74 2e 2c 20 53 | 75 69 74 65 20 38 30 32 |h St., S|uite 802|
|00001840| 0d 53 69 6c 76 65 72 20 | 53 70 72 69 6e 67 2c 20 |.Silver |Spring, |
|00001850| 4d 44 20 32 30 39 31 30 | 0d 28 33 30 31 29 2d 35 |MD 20910|.(301)-5|
|00001860| 38 39 2d 36 33 30 30 0d | 0d 61 6e 64 0d 0d 4c 61 |89-6300.|.and..La|
|00001870| 73 65 72 53 74 61 74 75 | 73 2c 20 61 20 64 65 73 |serStatu|s, a des|
|00001880| 6b 20 61 63 63 65 73 73 | 6f 72 79 20 69 6e 63 6c |k access|ory incl|
|00001890| 75 64 65 64 20 69 6e 20 | 74 68 65 20 0d 4d 6f 63 |uded in |the .Moc|
|000018a0| 6b 50 61 63 6b 61 67 65 | 20 50 6c 75 73 20 55 74 |kPackage| Plus Ut|
|000018b0| 69 6c 69 74 69 65 73 0d | 66 72 6f 6d 3a 0d 43 45 |ilities.|from:.CE|
|000018c0| 20 53 6f 66 74 77 61 72 | 65 0d 31 38 35 34 20 46 | Softwar|e.1854 F|
|000018d0| 75 6c 6c 65 72 20 52 6f | 61 64 0d 50 4f 20 42 6f |uller Ro|ad.PO Bo|
|000018e0| 78 20 36 35 35 38 30 0d | 57 65 73 74 20 44 65 73 |x 65580.|West Des|
|000018f0| 20 4d 6f 69 6e 65 73 2c | 20 49 6f 77 61 20 35 30 | Moines,| Iowa 50|
|00001900| 32 36 35 0d 28 35 31 35 | 29 2d 32 32 34 2d 31 39 |265.(515|)-224-19|
|00001910| 39 35 0d 0d 59 6f 75 20 | 6d 61 79 20 61 6c 73 6f |95..You |may also|
|00001920| 20 77 61 6e 74 20 74 6f | 20 72 65 61 64 3a 0d 0d | want to| read:..|
|00001930| 41 64 6f 62 65 20 53 79 | 73 74 65 6d 73 20 28 31 |Adobe Sy|stems (1|
|00001940| 39 38 35 29 20 50 6f 73 | 74 53 63 72 69 70 74 20 |985) Pos|tScript |
|00001950| 4c 61 6e 67 75 61 67 65 | 20 52 65 66 65 72 65 6e |Language| Referen|
|00001960| 63 65 20 4d 61 6e 75 61 | 6c 2c 20 53 65 63 6f 6e |ce Manua|l, Secon|
|00001970| 64 20 45 64 69 74 69 6f | 6e 2e 20 0d 52 65 61 64 |d Editio|n. .Read|
|00001980| 69 6e 67 2c 20 4d 41 3a | 20 41 64 64 69 73 6f 6e |ing, MA:| Addison|
|00001990| 2d 57 65 73 6c 65 79 2e | 0d 0d 50 65 6c 6c 69 2c |-Wesley.|..Pelli,|
|000019a0| 20 44 2e 20 47 2e 20 28 | 31 39 38 37 29 20 50 72 | D. G. (|1987) Pr|
|000019b0| 6f 67 72 61 6d 6d 69 6e | 67 20 69 6e 20 50 6f 73 |ogrammin|g in Pos|
|000019c0| 74 53 63 72 69 70 74 3a | 20 49 6d 61 67 69 6e 67 |tScript:| Imaging|
|000019d0| 20 6f 6e 20 70 61 70 65 | 72 20 66 72 6f 6d 20 61 | on pape|r from a|
|000019e0| 20 6d 61 74 68 65 6d 61 | 74 69 63 61 6c 0d 64 65 | mathema|tical.de|
|000019f0| 73 63 72 69 70 74 69 6f | 6e 2e 20 42 59 54 45 2c |scriptio|n. BYTE,|
|00001a00| 20 31 32 20 28 35 29 2c | 20 31 38 35 2d 32 30 32 | 12 (5),| 185-202|
|00001a10| 2e 0d 0d 48 49 53 54 4f | 52 59 3a 0d 34 2f 32 31 |...HISTO|RY:.4/21|
|00001a20| 2f 39 31 09 64 67 70 09 | 77 72 6f 74 65 20 69 74 |/91.dgp.|wrote it|
|00001a30| 0d 37 2f 32 34 2f 39 31 | 20 64 67 70 20 61 64 64 |.7/24/91| dgp add|
|00001a40| 65 64 20 63 6f 6d 6d 65 | 6e 74 20 61 62 6f 75 74 |ed comme|nt about|
|00001a50| 20 73 68 69 66 74 69 6e | 67 20 70 61 67 65 52 65 | shiftin|g pageRe|
|00001a60| 63 74 0d 38 2f 32 34 2f | 39 31 09 64 67 70 09 4d |ct.8/24/|91.dgp.M|
|00001a70| 61 64 65 20 63 6f 6d 70 | 61 74 69 62 6c 65 20 77 |ade comp|atible w|
|00001a80| 69 74 68 20 54 48 49 4e | 4b 20 43 20 35 2e 30 0d |ith THIN|K C 5.0.|
|00001a90| 31 32 2f 37 2f 39 31 09 | 64 67 70 09 6d 69 6e 6f |12/7/91.|dgp.mino|
|00001aa0| 72 20 65 64 69 74 69 6e | 67 20 6f 66 20 63 6f 6d |r editin|g of com|
|00001ab0| 6d 65 6e 74 73 0d 31 30 | 2f 31 30 2f 39 32 20 64 |ments.10|/10/92 d|
|00001ac0| 67 70 20 41 64 64 65 64 | 20 73 75 70 70 6f 72 74 |gp Added| support|
|00001ad0| 20 66 6f 72 20 50 69 78 | 6d 61 70 27 73 20 74 68 | for Pix|map's th|
|00001ae0| 61 74 20 72 65 71 75 69 | 72 65 20 33 32 2d 62 69 |at requi|re 32-bi|
|00001af0| 74 20 61 64 64 72 65 73 | 73 69 6e 67 2e 0d 09 09 |t addres|sing....|
|00001b00| 09 4d 75 63 68 20 66 61 | 73 74 65 72 20 6e 6f 77 |.Much fa|ster now|
|00001b10| 2c 20 75 73 69 6e 67 20 | 74 61 62 6c 65 2d 6c 6f |, using |table-lo|
|00001b20| 6f 6b 75 70 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |okup ins|tead of |
|00001b30| 73 70 72 69 6e 74 66 20 | 66 6f 72 20 0d 09 09 09 |sprintf |for ....|
|00001b40| 74 68 65 20 68 65 78 20 | 65 6e 63 6f 64 69 6e 67 |the hex |encoding|
|00001b50| 2e 0d 09 09 09 44 65 6c | 65 74 65 64 20 6f 62 73 |.....Del|eted obs|
|00001b60| 6f 6c 65 74 65 20 73 75 | 70 70 6f 72 74 20 66 6f |olete su|pport fo|
|00001b70| 72 20 54 48 49 4e 4b 20 | 43 20 34 2e 0d 34 2f 32 |r THINK |C 4..4/2|
|00001b80| 39 2f 39 33 09 64 67 70 | 09 26 20 6a 61 73 20 41 |9/93.dgp|.& jas A|
|00001b90| 64 64 65 64 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e |dded exp|lanation|
|00001ba0| 20 6f 66 20 68 6f 77 20 | 74 6f 20 64 6f 20 74 69 | of how |to do ti|
|00001bb0| 6c 69 6e 67 2e 0d 35 2f | 32 37 2f 39 33 09 64 67 |ling..5/|27/93.dg|
|00001bc0| 70 09 6d 69 6e 6f 72 20 | 65 64 69 74 69 6e 67 20 |p.minor |editing |
|00001bd0| 66 6f 72 20 73 70 65 65 | 64 20 61 6e 64 20 63 6c |for spee|d and cl|
|00001be0| 61 72 69 74 79 0d 36 2f | 31 35 2f 39 33 09 64 67 |arity.6/|15/93.dg|
|00001bf0| 70 09 46 69 78 65 64 20 | 73 69 6c 6c 79 20 62 75 |p.Fixed |silly bu|
|00001c00| 67 20 69 6e 74 72 6f 64 | 75 63 65 64 20 35 2f 32 |g introd|uced 5/2|
|00001c10| 37 2f 39 33 20 74 68 61 | 74 20 73 75 70 70 72 65 |7/93 tha|t suppre|
|00001c20| 73 73 65 64 20 61 6c 6c | 20 68 65 78 20 64 61 74 |ssed all| hex dat|
|00001c30| 61 2e 0d 09 09 09 43 61 | 6c 6c 20 53 74 72 69 70 |a.....Ca|ll Strip|
|00001c40| 41 64 64 72 65 73 73 2e | 0d 36 2f 32 39 2f 39 33 |Address.|.6/29/93|
|00001c50| 09 64 67 70 09 43 68 61 | 6e 67 65 64 20 63 61 6c |.dgp.Cha|nged cal|
|00001c60| 6c 20 69 6e 74 65 72 66 | 61 63 65 20 74 6f 20 61 |l interf|ace to a|
|00001c70| 63 63 65 70 74 20 61 20 | 70 69 78 6d 61 70 20 68 |ccept a |pixmap h|
|00001c80| 61 6e 64 6c 65 20 69 6e | 73 74 65 61 64 20 6f 66 |andle in|stead of|
|00001c90| 20 61 20 70 6f 69 6e 74 | 65 72 2e 0d 09 09 09 54 | a point|er.....T|
|00001ca0| 68 65 20 70 72 6f 62 6c | 65 6d 20 77 69 74 68 20 |he probl|em with |
|00001cb0| 61 63 63 65 70 74 69 6e | 67 20 61 20 70 6f 69 6e |acceptin|g a poin|
|00001cc0| 74 65 72 20 69 73 20 74 | 68 61 74 20 74 68 65 20 |ter is t|hat the |
|00001cd0| 75 73 65 72 20 6d 75 73 | 74 20 72 65 6d 65 6d 62 |user mus|t rememb|
|00001ce0| 65 72 0d 09 09 09 74 6f | 20 6c 6f 63 6b 20 74 68 |er....to| lock th|
|00001cf0| 65 20 68 61 6e 64 6c 65 | 20 62 65 66 6f 72 65 20 |e handle| before |
|00001d00| 64 65 72 65 66 65 72 65 | 6e 63 69 6e 67 20 69 74 |derefere|ncing it|
|00001d10| 20 74 6f 20 67 65 74 20 | 74 68 65 20 70 6f 69 6e | to get |the poin|
|00001d20| 74 65 72 2c 20 61 6e 64 | 0d 09 09 09 6c 6f 74 73 |ter, and|....lots|
|00001d30| 20 6f 66 20 70 65 6f 70 | 6c 65 20 66 6f 72 67 65 | of peop|le forge|
|00001d40| 74 2c 20 6c 65 61 64 69 | 6e 67 20 74 6f 20 61 20 |t, leadi|ng to a |
|00001d50| 6d 79 73 74 65 72 69 6f | 75 73 20 63 72 61 73 68 |mysterio|us crash|
|00001d60| 2e 20 4e 6f 77 20 74 68 | 65 20 6c 6f 63 6b 69 6e |. Now th|e lockin|
|00001d70| 67 0d 09 09 09 69 73 20 | 68 61 6e 64 6c 65 64 20 |g....is |handled |
|00001d80| 69 6e 74 65 72 6e 61 6c | 6c 79 2c 20 61 75 74 6f |internal|ly, auto|
|00001d90| 6d 61 74 69 63 61 6c 6c | 79 2e 0d 36 2f 33 30 2f |maticall|y..6/30/|
|00001da0| 39 33 09 64 67 70 09 41 | 64 64 65 64 20 65 78 61 |93.dgp.A|dded exa|
|00001db0| 6d 70 6c 65 2c 20 61 62 | 6f 76 65 2c 20 73 68 6f |mple, ab|ove, sho|
|00001dc0| 77 69 6e 67 20 68 6f 77 | 20 74 6f 20 70 72 69 6e |wing how| to prin|
|00001dd0| 74 20 73 63 72 65 65 6e | 20 74 6f 20 64 69 73 6b |t screen| to disk|
|00001de0| 2e 0d 37 2f 39 2f 39 33 | 09 64 67 70 20 63 68 65 |..7/9/93|.dgp che|
|00001df0| 63 6b 20 66 6f 72 20 33 | 32 2d 62 69 74 20 61 64 |ck for 3|2-bit ad|
|00001e00| 64 72 65 73 73 69 6e 67 | 20 63 61 70 61 62 69 6c |dressing| capabil|
|00001e10| 69 74 79 2e 0d 31 32 2f | 31 35 2f 39 33 20 64 67 |ity..12/|15/93 dg|
|00001e20| 70 20 61 64 64 65 64 20 | 66 69 6c 65 6e 61 6d 65 |p added |filename|
|00001e30| 20 61 72 67 75 6d 65 6e | 74 20 74 6f 20 74 68 65 | argumen|t to the|
|00001e40| 20 64 69 61 67 6e 6f 73 | 74 69 63 20 6d 65 73 73 | diagnos|tic mess|
|00001e50| 61 67 65 73 2e 0d 09 09 | 09 43 6f 72 72 65 63 74 |ages....|.Correct|
|00001e60| 65 64 20 67 72 61 79 4c | 65 76 65 6c 73 20 74 6f |ed grayL|evels to|
|00001e70| 20 67 72 61 79 4c 65 76 | 65 6c 73 2d 31 20 69 6e | grayLev|els-1 in|
|00001e80| 20 63 6f 6d 70 75 74 69 | 6e 67 0d 09 09 09 74 68 | computi|ng....th|
|00001e90| 65 20 72 65 71 75 69 72 | 65 64 20 6e 75 6d 62 65 |e requir|ed numbe|
|00001ea0| 72 20 6f 66 20 70 69 78 | 65 6c 73 20 69 6e 20 74 |r of pix|els in t|
|00001eb0| 68 65 20 68 61 6c 66 74 | 6f 6e 65 20 63 65 6c 6c |he halft|one cell|
|00001ec0| 2e 0d 36 2f 31 38 2f 39 | 34 09 64 67 70 09 63 61 |..6/18/9|4.dgp.ca|
|00001ed0| 6e 33 32 20 69 73 20 6e | 6f 77 20 63 6f 6d 70 75 |n32 is n|ow compu|
|00001ee0| 74 65 64 20 62 79 20 63 | 61 6c 6c 69 6e 67 20 54 |ted by c|alling T|
|00001ef0| 72 61 70 41 76 61 69 6c | 61 62 6c 65 28 5f 53 77 |rapAvail|able(_Sw|
|00001f00| 61 70 4d 4d 55 4d 6f 64 | 65 29 2c 20 77 68 69 63 |apMMUMod|e), whic|
|00001f10| 68 20 0d 09 09 09 72 65 | 74 75 72 6e 73 20 74 68 |h ....re|turns th|
|00001f20| 65 20 63 6f 72 72 65 63 | 74 20 61 6e 73 77 65 72 |e correc|t answer|
|00001f30| 20 65 76 65 6e 20 6f 6e | 20 4d 61 63 73 20 77 69 | even on| Macs wi|
|00001f40| 74 68 20 64 69 72 74 79 | 20 52 4f 4d 73 2e 0d 39 |th dirty| ROMs..9|
|00001f50| 2f 35 2f 39 34 20 64 67 | 70 20 72 65 6d 6f 76 65 |/5/94 dg|p remove|
|00001f60| 64 20 61 73 73 75 6d 70 | 74 69 6f 6e 20 69 6e 20 |d assump|tion in |
|00001f70| 70 72 69 6e 74 66 27 73 | 20 74 68 61 74 20 69 6e |printf's| that in|
|00001f80| 74 3d 3d 73 68 6f 72 74 | 2e 0d 35 2f 32 33 2f 39 |t==short|..5/23/9|
|00001f90| 35 20 64 67 70 20 41 70 | 70 6c 65 20 63 68 61 6e |5 dgp Ap|ple chan|
|00001fa0| 67 65 64 20 74 68 65 20 | 70 72 6f 74 6f 74 79 70 |ged the |prototyp|
|00001fb0| 65 20 69 6e 20 74 68 65 | 20 68 65 61 64 65 72 20 |e in the| header |
|00001fc0| 66 69 6c 65 20 66 72 6f | 6d 20 53 77 61 70 4d 4d |file fro|m SwapMM|
|00001fd0| 55 4d 6f 64 65 28 63 68 | 61 72 20 2a 29 20 74 6f |UMode(ch|ar *) to|
|00001fe0| 20 0d 09 09 09 53 77 61 | 70 4d 4d 55 4d 6f 64 65 | ....Swa|pMMUMode|
|00001ff0| 28 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 29 2e |(signed |char *).|
|00002000| 20 54 6f 20 72 65 74 61 | 69 6e 20 63 6f 6d 70 61 | To reta|in compa|
|00002010| 74 69 62 69 6c 69 74 79 | 20 77 69 74 68 20 62 6f |tibility| with bo|
|00002020| 74 68 20 6f 6c 64 20 61 | 6e 64 20 6e 65 77 0d 09 |th old a|nd new..|
|00002030| 09 09 68 65 61 64 65 72 | 73 2c 20 49 20 63 61 73 |..header|s, I cas|
|00002040| 74 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 28 |t the ar|gument (|
|00002050| 76 6f 69 64 20 2a 29 2e | 0d 2a 2f 0d 23 69 6e 63 |void *).|.*/.#inc|
|00002060| 6c 75 64 65 20 22 56 69 | 64 65 6f 54 6f 6f 6c 62 |lude "Vi|deoToolb|
|00002070| 6f 78 2e 68 22 0d 23 69 | 66 6e 64 65 66 20 5f 5f |ox.h".#i|fndef __|
|00002080| 54 52 41 50 53 5f 5f 0d | 09 23 69 6e 63 6c 75 64 |TRAPS__.|.#includ|
|00002090| 65 20 3c 54 72 61 70 73 | 2e 68 3e 09 09 2f 2f 20 |e <Traps|.h>..// |
|000020a0| 5f 53 77 61 70 4d 4d 55 | 4d 6f 64 65 0d 23 65 6e |_SwapMMU|Mode.#en|
|000020b0| 64 69 66 0d 23 64 65 66 | 69 6e 65 20 43 52 45 41 |dif.#def|ine CREA|
|000020c0| 54 4f 52 20 27 34 50 53 | 55 27 09 2f 2a 20 69 64 |TOR '4PS|U'./* id|
|000020d0| 65 6e 74 69 66 69 65 73 | 20 74 68 65 20 70 6f 73 |entifies| the pos|
|000020e0| 74 73 63 72 69 70 74 20 | 66 69 6c 65 20 61 73 20 |tscript |file as |
|000020f0| 61 20 50 6f 73 74 48 61 | 73 74 65 20 64 6f 63 75 |a PostHa|ste docu|
|00002100| 6d 65 6e 74 20 2a 2f 0d | 0d 76 6f 69 64 20 50 69 |ment */.|.void Pi|
|00002110| 78 4d 61 70 54 6f 50 6f | 73 74 53 63 72 69 70 74 |xMapToPo|stScript|
|00002120| 28 63 68 61 72 20 2a 66 | 69 6c 65 6e 61 6d 65 2c |(char *f|ilename,|
|00002130| 50 69 78 4d 61 70 20 2a | 2a 70 6d 2c 52 65 63 74 |PixMap *|*pm,Rect|
|00002140| 20 2a 72 65 63 74 50 74 | 72 0d 09 2c 52 65 63 74 | *rectPt|r..,Rect|
|00002150| 20 2a 70 61 67 65 52 65 | 63 74 50 74 72 2c 64 6f | *pageRe|ctPtr,do|
|00002160| 75 62 6c 65 20 63 65 6c | 6c 73 50 65 72 49 6e 63 |uble cel|lsPerInc|
|00002170| 68 2c 69 6e 74 20 67 72 | 61 79 4c 65 76 65 6c 73 |h,int gr|ayLevels|
|00002180| 29 0d 7b 0d 09 46 49 4c | 45 20 2a 66 69 6c 65 3b |).{..FIL|E *file;|
|00002190| 0d 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |..unsign|ed char |
|000021a0| 2a 61 64 64 72 3b 0d 09 | 6c 6f 6e 67 20 79 2c 62 |*addr;..|long y,b|
|000021b0| 79 74 65 73 2c 77 69 64 | 74 68 3b 0d 09 72 65 67 |ytes,wid|th;..reg|
|000021c0| 69 73 74 65 72 20 6c 6f | 6e 67 20 69 3b 0d 09 75 |ister lo|ng i;..u|
|000021d0| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 20 2a 62 |nsigned |short *b|
|000021e0| 75 66 66 65 72 2c 2a 62 | 75 66 66 65 72 33 32 3b |uffer,*b|uffer32;|
|000021f0| 0d 09 72 65 67 69 73 74 | 65 72 20 75 6e 73 69 67 |..regist|er unsig|
|00002200| 6e 65 64 20 73 68 6f 72 | 74 20 2a 77 6f 72 64 2c |ned shor|t *word,|
|00002210| 68 65 78 5b 32 35 36 5d | 3b 0d 09 72 65 67 69 73 |hex[256]|;..regis|
|00002220| 74 65 72 20 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |ter unsi|gned cha|
|00002230| 72 20 2a 62 79 74 65 3b | 0d 09 73 68 6f 72 74 20 |r *byte;|..short |
|00002240| 70 69 78 65 6c 53 69 7a | 65 3b 0d 09 73 68 6f 72 |pixelSiz|e;..shor|
|00002250| 74 20 72 6f 77 42 79 74 | 65 73 3b 0d 09 74 69 6d |t rowByt|es;..tim|
|00002260| 65 5f 74 20 41 4e 53 49 | 54 69 6d 65 3b 0d 09 63 |e_t ANSI|Time;..c|
|00002270| 68 61 72 20 73 74 72 69 | 6e 67 5b 31 30 30 5d 3b |har stri|ng[100];|
|00002280| 0d 09 73 69 67 6e 65 64 | 20 63 68 61 72 20 6d 6f |..signed| char mo|
|00002290| 64 65 3b 0d 09 63 68 61 | 72 20 70 6d 53 74 61 74 |de;..cha|r pmStat|
|000022a0| 65 3b 0d 09 42 6f 6f 6c | 65 61 6e 20 63 61 6e 33 |e;..Bool|ean can3|
|000022b0| 32 3b 0d 0d 09 61 73 73 | 65 72 74 28 53 74 61 63 |2;...ass|ert(Stac|
|000022c0| 6b 53 70 61 63 65 28 29 | 3e 35 30 30 30 29 3b 0d |kSpace()|>5000);.|
|000022d0| 09 63 61 6e 33 32 3d 54 | 72 61 70 41 76 61 69 6c |.can32=T|rapAvail|
|000022e0| 61 62 6c 65 28 5f 53 77 | 61 70 4d 4d 55 4d 6f 64 |able(_Sw|apMMUMod|
|000022f0| 65 29 3b 0d 09 69 66 28 | 63 65 6c 6c 73 50 65 72 |e);..if(|cellsPer|
|00002300| 49 6e 63 68 21 3d 30 2e | 30 20 26 26 20 67 72 61 |Inch!=0.|0 && gra|
|00002310| 79 4c 65 76 65 6c 73 21 | 3d 30 2e 30 29 50 72 69 |yLevels!|=0.0)Pri|
|00002320| 6e 74 66 45 78 69 74 28 | 22 50 69 78 4d 61 70 54 |ntfExit(|"PixMapT|
|00002330| 6f 50 6f 73 74 53 63 72 | 69 70 74 28 25 73 29 3a |oPostScr|ipt(%s):|
|00002340| 20 22 0d 09 09 22 79 6f | 75 20 6d 61 79 20 6e 6f | "..."yo|u may no|
|00002350| 74 20 73 70 65 63 69 66 | 79 20 42 4f 54 48 20 63 |t specif|y BOTH c|
|00002360| 65 6c 6c 73 50 65 72 49 | 6e 63 68 20 26 20 67 72 |ellsPerI|nch & gr|
|00002370| 61 79 4c 65 76 65 6c 73 | 2e 5c 6e 22 0d 09 09 22 |ayLevels|.\n"..."|
|00002380| 53 65 74 20 6f 6e 65 20 | 74 6f 20 7a 65 72 6f 2e |Set one |to zero.|
|00002390| 5c 6e 22 2c 66 69 6c 65 | 6e 61 6d 65 29 3b 0d 09 |\n",file|name);..|
|000023a0| 66 69 6c 65 3d 66 6f 70 | 65 6e 28 66 69 6c 65 6e |file=fop|en(filen|
|000023b0| 61 6d 65 2c 22 61 22 29 | 3b 0d 09 69 66 28 66 69 |ame,"a")|;..if(fi|
|000023c0| 6c 65 3d 3d 4e 55 4c 4c | 29 50 72 69 6e 74 66 45 |le==NULL|)PrintfE|
|000023d0| 78 69 74 28 22 50 69 78 | 4d 61 70 54 6f 50 6f 73 |xit("Pix|MapToPos|
|000023e0| 74 53 63 72 69 70 74 3a | 20 45 72 72 6f 72 20 69 |tScript:| Error i|
|000023f0| 6e 20 6f 70 65 6e 69 6e | 67 20 66 69 6c 65 20 d2 |n openin|g file .|
|00002400| 25 73 d3 2e 5c 6e 22 0d | 09 09 2c 66 69 6c 65 6e |%s..\n".|..,filen|
|00002410| 61 6d 65 29 3b 0d 09 70 | 6d 53 74 61 74 65 3d 48 |ame);..p|mState=H|
|00002420| 47 65 74 53 74 61 74 65 | 28 28 48 61 6e 64 6c 65 |GetState|((Handle|
|00002430| 29 70 6d 29 3b 0d 09 48 | 4c 6f 63 6b 28 28 48 61 |)pm);..H|Lock((Ha|
|00002440| 6e 64 6c 65 29 70 6d 29 | 3b 0d 09 61 64 64 72 3d |ndle)pm)|;..addr=|
|00002450| 52 65 63 74 54 6f 41 64 | 64 72 65 73 73 28 2a 70 |RectToAd|dress(*p|
|00002460| 6d 2c 72 65 63 74 50 74 | 72 2c 26 72 6f 77 42 79 |m,rectPt|r,&rowBy|
|00002470| 74 65 73 2c 26 70 69 78 | 65 6c 53 69 7a 65 2c 4e |tes,&pix|elSize,N|
|00002480| 55 4c 4c 29 3b 0d 09 69 | 66 28 61 64 64 72 3d 3d |ULL);..i|f(addr==|
|00002490| 4e 55 4c 4c 29 50 72 69 | 6e 74 66 45 78 69 74 28 |NULL)Pri|ntfExit(|
|000024a0| 22 50 69 78 4d 61 70 54 | 6f 50 6f 73 74 53 63 72 |"PixMapT|oPostScr|
|000024b0| 69 70 74 28 25 73 29 3a | 20 42 61 64 20 50 69 78 |ipt(%s):| Bad Pix|
|000024c0| 4d 61 70 2e 5c 6e 22 2c | 66 69 6c 65 6e 61 6d 65 |Map.\n",|filename|
|000024d0| 29 3b 0d 09 69 66 28 70 | 69 78 65 6c 53 69 7a 65 |);..if(p|ixelSize|
|000024e0| 21 3d 38 29 50 72 69 6e | 74 66 45 78 69 74 28 22 |!=8)Prin|tfExit("|
|000024f0| 50 69 78 4d 61 70 54 6f | 50 6f 73 74 53 63 72 69 |PixMapTo|PostScri|
|00002500| 70 74 28 25 73 29 3a 20 | 22 0d 09 09 22 53 6f 72 |pt(%s): |"..."Sor|
|00002510| 72 79 2c 20 70 69 78 65 | 6c 53 69 7a 65 20 6d 75 |ry, pixe|lSize mu|
|00002520| 73 74 20 62 65 20 38 2c | 20 6e 6f 74 20 25 64 2e |st be 8,| not %d.|
|00002530| 5c 6e 22 2c 66 69 6c 65 | 6e 61 6d 65 2c 28 69 6e |\n",file|name,(in|
|00002540| 74 29 70 69 78 65 6c 53 | 69 7a 65 29 3b 0d 09 74 |t)pixelS|ize);..t|
|00002550| 69 6d 65 28 26 41 4e 53 | 49 54 69 6d 65 29 3b 0d |ime(&ANS|ITime);.|
|00002560| 09 73 74 72 66 74 69 6d | 65 28 73 74 72 69 6e 67 |.strftim|e(string|
|00002570| 2c 73 69 7a 65 6f 66 28 | 73 74 72 69 6e 67 29 2c |,sizeof(|string),|
|00002580| 22 25 49 3a 25 4d 20 25 | 70 20 25 41 2c 20 25 42 |"%I:%M %|p %A, %B|
|00002590| 20 25 64 2c 20 25 59 22 | 2c 6c 6f 63 61 6c 74 69 | %d, %Y"|,localti|
|000025a0| 6d 65 28 26 41 4e 53 49 | 54 69 6d 65 29 29 3b 0d |me(&ANSI|Time));.|
|000025b0| 09 66 70 72 69 6e 74 66 | 28 66 69 6c 65 2c 0d 09 |.fprintf|(file,..|
|000025c0| 09 22 5c 6e 73 61 76 65 | 09 09 09 09 09 25 25 20 |."\nsave|.....%% |
|000025d0| 25 73 2c 20 25 73 5c 6e | 22 2c 66 69 6c 65 6e 61 |%s, %s\n|",filena|
|000025e0| 6d 65 2c 73 74 72 69 6e | 67 29 3b 0d 09 66 70 72 |me,strin|g);..fpr|
|000025f0| 69 6e 74 66 28 66 69 6c | 65 2c 0d 09 09 22 2f 6e |intf(fil|e,..."/n|
|00002600| 78 20 25 64 20 64 65 66 | 09 09 09 09 25 25 20 70 |x %d def|....%% p|
|00002610| 69 78 65 6c 73 20 70 65 | 72 20 72 61 73 74 65 72 |ixels pe|r raster|
|00002620| 20 6c 69 6e 65 5c 6e 22 | 2c 28 69 6e 74 29 28 72 | line\n"|,(int)(r|
|00002630| 65 63 74 50 74 72 2d 3e | 72 69 67 68 74 2d 72 65 |ectPtr->|right-re|
|00002640| 63 74 50 74 72 2d 3e 6c | 65 66 74 29 29 3b 0d 09 |ctPtr->l|eft));..|
|00002650| 66 70 72 69 6e 74 66 28 | 66 69 6c 65 2c 0d 09 09 |fprintf(|file,...|
|00002660| 22 2f 6e 79 20 25 64 20 | 64 65 66 09 09 09 09 25 |"/ny %d |def....%|
|00002670| 25 20 6c 69 6e 65 73 20 | 69 6e 20 69 6d 61 67 65 |% lines |in image|
|00002680| 5c 6e 22 2c 28 69 6e 74 | 29 28 72 65 63 74 50 74 |\n",(int|)(rectPt|
|00002690| 72 2d 3e 62 6f 74 74 6f | 6d 2d 72 65 63 74 50 74 |r->botto|m-rectPt|
|000026a0| 72 2d 3e 74 6f 70 29 29 | 3b 0d 09 66 70 72 69 6e |r->top))|;..fprin|
|000026b0| 74 66 28 66 69 6c 65 2c | 0d 09 09 22 25 64 20 25 |tf(file,|..."%d %|
|000026c0| 64 20 74 72 61 6e 73 6c | 61 74 65 09 09 09 25 25 |d transl|ate...%%|
|000026d0| 20 6c 6f 63 61 74 65 20 | 6c 6f 77 65 72 20 6c 65 | locate |lower le|
|000026e0| 66 74 20 6f 66 20 69 6d | 61 67 65 5c 6e 22 0d 09 |ft of im|age\n"..|
|000026f0| 09 2c 28 69 6e 74 29 70 | 61 67 65 52 65 63 74 50 |.,(int)p|ageRectP|
|00002700| 74 72 2d 3e 6c 65 66 74 | 2c 28 69 6e 74 29 70 61 |tr->left|,(int)pa|
|00002710| 67 65 52 65 63 74 50 74 | 72 2d 3e 62 6f 74 74 6f |geRectPt|r->botto|
|00002720| 6d 29 3b 0d 09 66 70 72 | 69 6e 74 66 28 66 69 6c |m);..fpr|intf(fil|
|00002730| 65 2c 0d 09 09 22 25 64 | 20 25 64 20 73 63 61 6c |e,..."%d| %d scal|
|00002740| 65 09 09 09 25 25 20 70 | 72 69 6e 74 20 69 6d 61 |e...%% p|rint ima|
|00002750| 67 65 20 77 69 74 68 20 | 74 68 65 73 65 20 64 69 |ge with |these di|
|00002760| 6d 65 6e 73 69 6f 6e 73 | 20 6f 6e 20 70 61 67 65 |mensions| on page|
|00002770| 5c 6e 22 0d 09 09 2c 28 | 69 6e 74 29 28 70 61 67 |\n"...,(|int)(pag|
|00002780| 65 52 65 63 74 50 74 72 | 2d 3e 72 69 67 68 74 2d |eRectPtr|->right-|
|00002790| 70 61 67 65 52 65 63 74 | 50 74 72 2d 3e 6c 65 66 |pageRect|Ptr->lef|
|000027a0| 74 29 2c 28 69 6e 74 29 | 28 70 61 67 65 52 65 63 |t),(int)|(pageRec|
|000027b0| 74 50 74 72 2d 3e 74 6f | 70 2d 70 61 67 65 52 65 |tPtr->to|p-pageRe|
|000027c0| 63 74 50 74 72 2d 3e 62 | 6f 74 74 6f 6d 29 29 3b |ctPtr->b|ottom));|
|000027d0| 0d 09 66 70 72 69 6e 74 | 66 28 66 69 6c 65 2c 0d |..fprint|f(file,.|
|000027e0| 09 09 22 2f 68 79 70 6f | 74 65 6e 75 73 65 20 7b |.."/hypo|tenuse {|
|000027f0| 64 75 70 20 6d 75 6c 20 | 65 78 63 68 20 64 75 70 |dup mul |exch dup|
|00002800| 20 6d 75 6c 20 61 64 64 | 20 73 71 72 74 7d 20 62 | mul add| sqrt} b|
|00002810| 69 6e 64 20 64 65 66 5c | 6e 22 0d 09 09 22 2f 70 |ind def\|n"..."/p|
|00002820| 69 78 65 6c 73 50 65 72 | 49 6e 63 68 20 67 73 61 |ixelsPer|Inch gsa|
|00002830| 76 65 20 69 6e 69 74 6d | 61 74 72 69 78 20 37 32 |ve initm|atrix 72|
|00002840| 20 30 20 64 74 72 61 6e | 73 66 6f 72 6d 20 68 79 | 0 dtran|sform hy|
|00002850| 70 6f 74 65 6e 75 73 65 | 20 67 72 65 73 74 6f 72 |potenuse| grestor|
|00002860| 65 20 64 65 66 5c 6e 22 | 29 3b 0d 09 69 66 28 63 |e def\n"|);..if(c|
|00002870| 65 6c 6c 73 50 65 72 49 | 6e 63 68 21 3d 30 2e 30 |ellsPerI|nch!=0.0|
|00002880| 29 7b 0d 09 09 66 70 72 | 69 6e 74 66 28 66 69 6c |){...fpr|intf(fil|
|00002890| 65 2c 0d 09 09 09 22 2f | 63 65 6c 6c 73 50 65 72 |e,...."/|cellsPer|
|000028a0| 49 6e 63 68 20 25 2e 32 | 66 20 64 65 66 09 25 25 |Inch %.2|f def.%%|
|000028b0| 20 68 61 6c 66 74 6f 6e | 65 20 64 6f 74 20 66 72 | halfton|e dot fr|
|000028c0| 65 71 75 65 6e 63 79 5c | 6e 22 2c 63 65 6c 6c 73 |equency\|n",cells|
|000028d0| 50 65 72 49 6e 63 68 29 | 3b 0d 09 09 66 70 72 69 |PerInch)|;...fpri|
|000028e0| 6e 74 66 28 66 69 6c 65 | 2c 0d 09 09 09 22 63 65 |ntf(file|,...."ce|
|000028f0| 6c 6c 73 50 65 72 49 6e | 63 68 20 63 75 72 72 65 |llsPerIn|ch curre|
|00002900| 6e 74 73 63 72 65 65 6e | 20 34 20 2d 32 20 72 6f |ntscreen| 4 -2 ro|
|00002910| 6c 6c 20 70 6f 70 20 33 | 20 31 20 72 6f 6c 6c 20 |ll pop 3| 1 roll |
|00002920| 73 65 74 73 63 72 65 65 | 6e 5c 6e 22 29 3b 0d 09 |setscree|n\n");..|
|00002930| 7d 0d 09 69 66 28 67 72 | 61 79 4c 65 76 65 6c 73 |}..if(gr|ayLevels|
|00002940| 21 3d 30 29 7b 0d 09 09 | 66 70 72 69 6e 74 66 28 |!=0){...|fprintf(|
|00002950| 66 69 6c 65 2c 0d 09 09 | 09 22 2f 63 65 6c 6c 73 |file,...|."/cells|
|00002960| 50 65 72 49 6e 63 68 20 | 70 69 78 65 6c 73 50 65 |PerInch |pixelsPe|
|00002970| 72 49 6e 63 68 20 25 2e | 32 66 20 64 69 76 20 64 |rInch %.|2f div d|
|00002980| 65 66 09 25 25 20 68 61 | 6c 66 74 6f 6e 65 20 64 |ef.%% ha|lftone d|
|00002990| 6f 74 20 66 72 65 71 75 | 65 6e 63 79 5c 6e 22 0d |ot frequ|ency\n".|
|000029a0| 09 09 09 2c 73 71 72 74 | 28 67 72 61 79 4c 65 76 |...,sqrt|(grayLev|
|000029b0| 65 6c 73 2d 31 29 29 3b | 0d 09 09 66 70 72 69 6e |els-1));|...fprin|
|000029c0| 74 66 28 66 69 6c 65 2c | 0d 09 09 09 22 63 65 6c |tf(file,|...."cel|
|000029d0| 6c 73 50 65 72 49 6e 63 | 68 20 63 75 72 72 65 6e |lsPerInc|h curren|
|000029e0| 74 73 63 72 65 65 6e 20 | 34 20 2d 32 20 72 6f 6c |tscreen |4 -2 rol|
|000029f0| 6c 20 70 6f 70 20 33 20 | 31 20 72 6f 6c 6c 20 73 |l pop 3 |1 roll s|
|00002a00| 65 74 73 63 72 65 65 6e | 5c 6e 22 29 3b 0d 09 7d |etscreen|\n");..}|
|00002a10| 0d 09 66 70 72 69 6e 74 | 66 28 66 69 6c 65 2c 0d |..fprint|f(file,.|
|00002a20| 09 09 22 2f 73 20 6e 78 | 20 73 74 72 69 6e 67 20 |.."/s nx| string |
|00002a30| 64 65 66 09 09 25 25 20 | 73 74 72 69 6e 67 20 74 |def..%% |string t|
|00002a40| 6f 20 68 6f 6c 64 20 6f | 6e 65 20 72 61 73 74 65 |o hold o|ne raste|
|00002a50| 72 20 6c 69 6e 65 5c 6e | 22 0d 09 09 22 6e 78 20 |r line\n|"..."nx |
|00002a60| 6e 79 20 38 09 09 09 09 | 09 25 25 20 64 69 6d 65 |ny 8....|.%% dime|
|00002a70| 6e 73 69 6f 6e 73 20 61 | 6e 64 20 62 69 74 73 2f |nsions a|nd bits/|
|00002a80| 70 69 78 65 6c 20 6f 66 | 20 73 6f 75 72 63 65 20 |pixel of| source |
|00002a90| 69 6d 61 67 65 5c 6e 22 | 0d 09 09 22 5b 6e 78 20 |image\n"|..."[nx |
|00002aa0| 30 20 30 20 6e 79 20 6e | 65 67 20 30 20 6e 79 5d |0 0 ny n|eg 0 ny]|
|00002ab0| 09 25 25 20 6d 61 70 20 | 75 6e 69 74 20 73 71 75 |.%% map |unit squ|
|00002ac0| 61 72 65 20 74 6f 20 50 | 69 78 4d 61 70 20 64 61 |are to P|ixMap da|
|00002ad0| 74 61 5c 6e 22 0d 09 09 | 22 7b 63 75 72 72 65 6e |ta\n"...|"{curren|
|00002ae0| 74 66 69 6c 65 20 73 20 | 72 65 61 64 68 65 78 73 |tfile s |readhexs|
|00002af0| 74 72 69 6e 67 20 70 6f | 70 7d 09 25 25 20 72 65 |tring po|p}.%% re|
|00002b00| 61 64 20 64 61 74 61 5c | 6e 22 0d 09 09 22 62 69 |ad data\|n"..."bi|
|00002b10| 6e 64 09 09 09 09 09 25 | 25 20 73 70 65 65 64 20 |nd.....%|% speed |
|00002b20| 75 70 20 72 65 61 64 69 | 6e 67 5c 6e 22 0d 09 09 |up readi|ng\n"...|
|00002b30| 22 69 6d 61 67 65 5c 6e | 22 29 3b 0d 09 61 73 73 |"image\n|");..ass|
|00002b40| 65 72 74 28 73 69 7a 65 | 6f 66 28 2a 62 79 74 65 |ert(size|of(*byte|
|00002b50| 29 3d 3d 31 29 3b 09 2f | 2f 20 72 65 71 75 69 72 |)==1);./|/ requir|
|00002b60| 65 64 20 62 79 20 6f 75 | 72 20 61 6c 67 6f 72 69 |ed by ou|r algori|
|00002b70| 74 68 6d 0d 09 61 73 73 | 65 72 74 28 73 69 7a 65 |thm..ass|ert(size|
|00002b80| 6f 66 28 2a 77 6f 72 64 | 29 3d 3d 32 29 3b 09 2f |of(*word|)==2);./|
|00002b90| 2f 20 72 65 71 75 69 72 | 65 64 20 62 79 20 6f 75 |/ requir|ed by ou|
|00002ba0| 72 20 61 6c 67 6f 72 69 | 74 68 6d 0d 09 66 6f 72 |r algori|thm..for|
|00002bb0| 28 69 3d 30 3b 69 3c 32 | 35 36 3b 69 2b 2b 29 7b |(i=0;i<2|56;i++){|
|00002bc0| 0d 09 09 73 70 72 69 6e | 74 66 28 73 74 72 69 6e |...sprin|tf(strin|
|00002bd0| 67 2c 22 25 30 32 78 22 | 2c 28 69 6e 74 29 69 29 |g,"%02x"|,(int)i)|
|00002be0| 3b 0d 09 09 68 65 78 5b | 69 5d 3d 2a 28 75 6e 73 |;...hex[|i]=*(uns|
|00002bf0| 69 67 6e 65 64 20 73 68 | 6f 72 74 20 2a 29 73 74 |igned sh|ort *)st|
|00002c00| 72 69 6e 67 3b 0d 09 7d | 0d 09 77 69 64 74 68 3d |ring;..}|..width=|
|00002c10| 72 65 63 74 50 74 72 2d | 3e 72 69 67 68 74 2d 72 |rectPtr-|>right-r|
|00002c20| 65 63 74 50 74 72 2d 3e | 6c 65 66 74 3b 0d 09 62 |ectPtr->|left;..b|
|00002c30| 79 74 65 73 3d 28 77 69 | 64 74 68 2b 31 29 2a 73 |ytes=(wi|dth+1)*s|
|00002c40| 69 7a 65 6f 66 28 2a 77 | 6f 72 64 29 3b 0d 09 62 |izeof(*w|ord);..b|
|00002c50| 75 66 66 65 72 3d 28 75 | 6e 73 69 67 6e 65 64 20 |uffer=(u|nsigned |
|00002c60| 73 68 6f 72 74 20 2a 29 | 4e 65 77 50 74 72 28 62 |short *)|NewPtr(b|
|00002c70| 79 74 65 73 29 3b 0d 09 | 69 66 28 62 75 66 66 65 |ytes);..|if(buffe|
|00002c80| 72 3d 3d 4e 55 4c 4c 29 | 50 72 69 6e 74 66 45 78 |r==NULL)|PrintfEx|
|00002c90| 69 74 28 22 50 69 78 4d | 61 70 54 6f 50 6f 73 74 |it("PixM|apToPost|
|00002ca0| 53 63 72 69 70 74 28 25 | 73 29 3a 20 22 0d 09 09 |Script(%|s): "...|
|00002cb0| 22 6e 6f 20 72 6f 6f 6d | 20 66 6f 72 20 25 6c 64 |"no room| for %ld|
|00002cc0| 20 62 79 74 65 20 62 75 | 66 66 65 72 2e 5c 6e 5c | byte bu|ffer.\n\|
|00002cd0| 30 30 37 22 2c 66 69 6c | 65 6e 61 6d 65 2c 62 79 |007",fil|ename,by|
|00002ce0| 74 65 73 29 3b 0d 09 62 | 75 66 66 65 72 33 32 3d |tes);..b|uffer32=|
|00002cf0| 28 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 |(unsigne|d short |
|00002d00| 2a 29 53 74 72 69 70 41 | 64 64 72 65 73 73 28 62 |*)StripA|ddress(b|
|00002d10| 75 66 66 65 72 29 3b 0d | 09 66 6f 72 28 79 3d 72 |uffer);.|.for(y=r|
|00002d20| 65 63 74 50 74 72 2d 3e | 74 6f 70 3b 79 3c 72 65 |ectPtr->|top;y<re|
|00002d30| 63 74 50 74 72 2d 3e 62 | 6f 74 74 6f 6d 3b 79 2b |ctPtr->b|ottom;y+|
|00002d40| 2b 29 7b 0d 09 09 6d 6f | 64 65 3d 74 72 75 65 33 |+){...mo|de=true3|
|00002d50| 32 62 3b 0d 09 09 69 66 | 28 63 61 6e 33 32 29 53 |2b;...if|(can32)S|
|00002d60| 77 61 70 4d 4d 55 4d 6f | 64 65 28 28 76 6f 69 64 |wapMMUMo|de((void|
|00002d70| 20 2a 29 26 6d 6f 64 65 | 29 3b 0d 09 09 62 79 74 | *)&mode|);...byt|
|00002d80| 65 3d 61 64 64 72 3b 0d | 09 09 77 6f 72 64 3d 62 |e=addr;.|..word=b|
|00002d90| 75 66 66 65 72 33 32 3b | 0d 09 09 66 6f 72 28 69 |uffer32;|...for(i|
|00002da0| 3d 30 3b 69 3c 77 69 64 | 74 68 3b 69 2b 2b 29 20 |=0;i<wid|th;i++) |
|00002db0| 2a 77 6f 72 64 2b 2b 20 | 3d 20 68 65 78 5b 2a 62 |*word++ |= hex[*b|
|00002dc0| 79 74 65 2b 2b 5d 3b 0d | 09 09 2a 77 6f 72 64 3d |yte++];.|..*word=|
|00002dd0| 30 3b 0d 09 09 69 66 28 | 63 61 6e 33 32 29 53 77 |0;...if(|can32)Sw|
|00002de0| 61 70 4d 4d 55 4d 6f 64 | 65 28 28 76 6f 69 64 20 |apMMUMod|e((void |
|00002df0| 2a 29 26 6d 6f 64 65 29 | 3b 0d 09 09 66 70 72 69 |*)&mode)|;...fpri|
|00002e00| 6e 74 66 28 66 69 6c 65 | 2c 22 25 73 5c 6e 22 2c |ntf(file|,"%s\n",|
|00002e10| 28 63 68 61 72 20 2a 29 | 62 75 66 66 65 72 29 3b |(char *)|buffer);|
|00002e20| 0d 09 09 61 64 64 72 2b | 3d 72 6f 77 42 79 74 65 |...addr+|=rowByte|
|00002e30| 73 3b 0d 09 7d 0d 09 48 | 53 65 74 53 74 61 74 65 |s;..}..H|SetState|
|00002e40| 28 28 48 61 6e 64 6c 65 | 29 70 6d 2c 70 6d 53 74 |((Handle|)pm,pmSt|
|00002e50| 61 74 65 29 3b 0d 09 44 | 69 73 70 6f 73 50 74 72 |ate);..D|isposPtr|
|00002e60| 28 28 50 74 72 29 62 75 | 66 66 65 72 29 3b 0d 09 |((Ptr)bu|ffer);..|
|00002e70| 66 70 72 69 6e 74 66 28 | 66 69 6c 65 2c 22 72 65 |fprintf(|file,"re|
|00002e80| 73 74 6f 72 65 5c 6e 22 | 29 3b 0d 09 66 63 6c 6f |store\n"|);..fclo|
|00002e90| 73 65 28 66 69 6c 65 29 | 3b 0d 09 53 65 74 46 69 |se(file)|;..SetFi|
|00002ea0| 6c 65 49 6e 66 6f 28 66 | 69 6c 65 6e 61 6d 65 2c |leInfo(f|ilename,|
|00002eb0| 27 54 45 58 54 27 2c 43 | 52 45 41 54 4f 52 29 3b |'TEXT',C|REATOR);|
|00002ec0| 0d 7d 0d 0d 76 6f 69 64 | 20 41 70 70 65 6e 64 54 |.}..void| AppendT|
|00002ed0| 6f 46 69 6c 65 28 63 68 | 61 72 20 2a 66 69 6c 65 |oFile(ch|ar *file|
|00002ee0| 6e 61 6d 65 2c 63 68 61 | 72 20 2a 73 74 72 69 6e |name,cha|r *strin|
|00002ef0| 67 29 0d 7b 0d 09 46 49 | 4c 45 20 2a 66 69 6c 65 |g).{..FI|LE *file|
|00002f00| 3b 0d 09 0d 09 66 69 6c | 65 3d 66 6f 70 65 6e 28 |;....fil|e=fopen(|
|00002f10| 66 69 6c 65 6e 61 6d 65 | 2c 22 61 22 29 3b 0d 09 |filename|,"a");..|
|00002f20| 69 66 28 66 69 6c 65 3d | 3d 4e 55 4c 4c 29 50 72 |if(file=|=NULL)Pr|
|00002f30| 69 6e 74 66 45 78 69 74 | 28 22 41 70 70 65 6e 64 |intfExit|("Append|
|00002f40| 54 6f 46 69 6c 65 3a 20 | 45 72 72 6f 72 20 69 6e |ToFile: |Error in|
|00002f50| 20 6f 70 65 6e 69 6e 67 | 20 66 69 6c 65 20 5c 22 | opening| file \"|
|00002f60| 25 73 5c 22 5c 6e 22 2c | 66 69 6c 65 6e 61 6d 65 |%s\"\n",|filename|
|00002f70| 29 3b 0d 09 66 70 72 69 | 6e 74 66 28 66 69 6c 65 |);..fpri|ntf(file|
|00002f80| 2c 22 25 73 22 2c 73 74 | 72 69 6e 67 29 3b 0d 09 |,"%s",st|ring);..|
|00002f90| 66 63 6c 6f 73 65 28 66 | 69 6c 65 29 3b 0d 7d 00 |fclose(f|ile);.}.|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 00 00 01 00 00 00 04 c8 | 00 00 03 c8 00 00 00 aa |........|........|
|00003010| 67 72 61 70 68 65 72 73 | 20 70 6f 69 6e 74 73 20 |graphers| points |
|00003020| 28 31 2f 37 32 22 29 2c | 0d 74 68 65 20 72 65 63 |(1/72"),|.the rec|
|00003030| 14 50 69 78 4d 61 70 54 | 6f 50 6f 73 74 53 63 72 |.PixMapT|oPostScr|
|00003040| 69 70 74 2e 63 72 02 00 | 00 00 54 45 58 54 43 57 |ipt.cr..|..TEXTCW|
|00003050| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 3c 04 20 |..TEXTCW|IE...<. |
|00003060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003070| 00 00 a4 39 1f ff 00 00 | 2f 1f 00 00 05 72 6c 0d |...9....|/....rl.|
|00003080| 74 68 61 74 20 79 6f 75 | 20 6b 65 65 70 20 69 6e |that you| keep in|
|00003090| 20 6d 69 6e 64 20 74 68 | 61 74 20 41 70 70 6c 65 | mind th|at Apple|
|000030a0| 20 61 6e 64 20 41 64 6f | 62 65 0d 75 73 65 20 64 | and Ado|be.use d|
|000030b0| 69 66 66 65 72 65 6e 74 | 20 63 6f 6f 72 64 69 6e |ifferent| coordin|
|000030c0| 61 74 65 20 73 79 73 74 | 65 6d 73 2e 20 42 6f 74 |ate syst|ems. Bot|
|000030d0| 68 20 41 70 70 6c 65 20 | 61 6e 64 20 41 64 6f 62 |h Apple |and Adob|
|000030e0| 65 20 69 6e 63 72 65 61 | 73 65 20 78 20 66 72 6f |e increa|se x fro|
|000030f0| 6d 20 6c 65 66 74 20 74 | 6f 20 72 69 67 68 74 2e |m left t|o right.|
|00003100| 00 00 00 f2 00 09 00 18 | 00 00 1c 8c 00 94 00 4e |........|.......N|
|00003110| 15 c4 00 00 09 70 69 78 | 65 6c 53 69 7a 65 00 18 |.....pix|elSize..|
|00003120| 00 00 1c 8c 00 94 00 4e | 15 b4 00 00 09 72 6f 77 |.......N|.....row|
|00003130| 42 79 74 65 73 20 00 28 | 00 00 1c 8c 00 94 00 4e |Bytes .(|.......N|
|00003140| 15 9c 80 00 01 54 00 23 | 01 c6 02 00 94 20 00 00 |.....T.#|..... ..|
|00003150| 00 00 00 00 09 2a 72 65 | 63 74 50 74 72 20 00 16 |.....*re|ctPtr ..|
|00003160| 00 00 1c 8c 00 94 00 4e | 15 50 00 00 07 72 65 63 |.......N|.P...rec|
|00003170| 74 50 74 72 00 1c 00 00 | 1c 8c 00 94 00 4e 15 40 |tPtr....|.....N.@|
|00003180| 00 00 0d 28 2a 70 6d 29 | 2e 62 6f 75 6e 64 73 20 |...(*pm)|.bounds |
|00003190| 00 1c 00 00 1c 8c 00 94 | 00 4e 15 2c 00 00 0d 28 |........|.N.,...(|
|000031a0| 2a 70 6d 29 2e 62 6f 75 | 6e 64 73 20 00 26 00 00 |*pm).bou|nds .&..|
|000031b0| 1c 8c 00 94 00 4e 15 1c | 80 00 01 40 00 1f 01 b2 |.....N..|...@....|
|000031c0| 01 fc 94 20 00 00 00 00 | 00 01 00 01 00 02 03 2a |... ....|.......*|
|000031d0| 70 6d 00 12 00 00 1c 8c | 00 94 00 4e 14 80 00 00 |pm......|...N....|
|000031e0| 03 70 6d 20 00 12 00 00 | 1c 8c 00 94 00 4e 14 70 |.pm ....|.....N.p|
|000031f0| 00 00 03 70 6d 20 00 00 | 00 14 00 00 27 4f 00 d9 |...pm ..|....'O..|
|00003200| 00 00 00 00 00 00 26 1c | 00 d1 00 00 00 00 00 00 |......&.|........|
|00003210| 01 48 00 0e 00 18 00 00 | 27 4f 00 d9 00 c8 c0 bc |.H......|'O......|
|00003220| 00 00 09 2a 72 65 63 74 | 50 74 72 20 00 16 00 00 |...*rect|Ptr ....|
|00003230| 27 4f 00 d9 00 c8 c0 44 | 00 00 07 72 65 63 74 50 |'O.....D|...rectP|
|00003240| 74 72 00 14 00 00 27 a3 | 00 db 00 c8 c0 34 00 00 |tr....'.|.....4..|
|00003250| 05 61 64 64 72 20 00 18 | 00 00 28 31 00 e1 00 c8 |.addr ..|..(1....|
|00003260| c0 24 00 00 09 72 6f 77 | 42 79 74 65 73 20 00 14 |.$...row|Bytes ..|
|00003270| 00 00 26 9e 00 d4 00 c8 | c0 14 00 00 05 62 79 74 |..&.....|.....byt|
|00003280| 65 73 00 14 00 00 27 a3 | 00 db 00 c8 c0 04 00 00 |es....'.|........|
|00003290| 05 62 79 74 65 20 00 16 | 00 00 27 c8 00 dd 00 c8 |.byte ..|..'.....|
|000032a0| bf f4 00 00 07 62 79 74 | 65 5b 69 5d 00 1c 00 00 |.....byt|e[i]....|
|000032b0| 27 c8 00 dd 00 c8 bf e4 | 10 04 0d 68 65 78 5b 62 |'.......|...hex[b|
|000032c0| 79 74 65 5b 69 5d 5d 20 | 00 18 00 00 27 c8 00 dd |yte[i]] |....'...|
|000032d0| 00 c8 bf d4 00 00 09 68 | 65 78 5b 32 35 35 5d 20 |.......h|ex[255] |
|000032e0| 00 16 00 00 26 31 00 d2 | 00 c8 bf c4 10 20 07 73 |....&1..|..... .s|
|000032f0| 74 72 69 6e 67 20 00 10 | 00 00 26 1c 00 d1 00 c8 |tring ..|..&.....|
|00003300| bf b4 00 00 01 69 00 16 | 00 00 26 31 00 d2 00 c8 |.....i..|..&1....|
|00003310| bf a4 10 20 07 22 25 30 | 32 78 22 20 00 28 00 00 |... ."%0|2x" .(..|
|00003320| 26 52 00 d2 00 c8 bf 94 | 00 00 19 2a 28 75 6e 73 |&R......|...*(uns|
|00003330| 69 67 6e 65 64 20 73 68 | 6f 72 74 20 2a 29 73 74 |igned sh|ort *)st|
|00003340| 72 69 6e 67 00 16 00 00 | 26 31 00 d2 00 c8 c0 b0 |ring....|&1......|
|00003350| 10 20 07 73 74 72 69 6e | 67 20 00 00 00 1e 00 29 |. .strin|g .....)|
|00003360| 01 42 01 6a 02 79 00 29 | 01 42 01 6a 02 79 00 00 |.B.j.y.)|.B.j.y..|
|00003370| 17 b3 00 00 00 00 00 00 | 00 00 00 00 00 00 00 34 |........|.......4|
|00003380| 00 02 00 00 2c 62 00 00 | 2c 6e 0d 41 70 70 65 6e |....,b..|,n.Appen|
|00003390| 64 54 6f 46 69 6c 65 00 | 00 00 1e f0 00 00 1f 02 |dToFile.|........|
|000033a0| 13 50 69 78 4d 61 70 54 | 6f 50 6f 73 74 53 63 72 |.PixMapT|oPostScr|
|000033b0| 69 70 74 00 00 00 00 0a | 00 00 28 99 00 e2 00 00 |ipt.....|..(.....|
|000033c0| 00 00 00 00 00 ae 00 07 | 00 14 ff ff ff ff 00 e5 |........|........|
|000033d0| 00 fa 50 2c 00 00 05 77 | 69 64 74 68 00 18 00 00 |..P,...w|idth....|
|000033e0| 29 1f 00 e5 00 fa 50 0c | 10 04 09 77 6f 72 64 5b |).....P.|...word[|
|000033f0| 2d 31 5d 20 00 18 00 00 | 29 1f 00 e5 00 fa 4f fc |-1] ....|).....O.|
|00003400| 00 00 09 62 79 74 65 5b | 2d 31 5d 20 00 1c ff ff |...byte[|-1] ....|
|00003410| ff ff 00 e5 00 fa 4f ec | 10 20 0d 28 63 68 61 72 |......O.|. .(char|
|00003420| 20 2a 29 77 6f 72 64 20 | 00 1e ff ff ff ff 00 e5 | *)word |........|
|00003430| 00 fa 4f dc 10 20 0f 28 | 63 68 61 72 20 2a 29 62 |..O.. .(|char *)b|
|00003440| 75 66 66 65 72 20 00 16 | ff ff ff ff 00 e2 00 fa |uffer ..|........|
|00003450| 4f cc 00 00 07 62 75 66 | 66 65 72 20 00 18 ff ff |O....buf|fer ....|
|00003460| ff ff 00 e2 00 fa 4f bc | 00 00 09 62 75 66 66 65 |......O.|...buffe|
|00003470| 72 33 32 20 00 00 00 48 | 00 09 4d 6f 6e 61 63 6f |r32 ...H|..Monaco|
|00003480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003490| 00 00 00 00 00 00 00 00 | 00 00 00 03 00 04 00 62 |........|.......b|
|000034a0| 00 0e 01 83 02 6d 00 62 | 00 0e 01 83 02 6d ac 4e |.....m.b|.....m.N|
|000034b0| d3 d5 00 00 2d a9 00 00 | 2d b1 00 00 2c 2e 00 00 |....-...|-...,...|
|000034c0| 00 00 00 04 00 01 00 01 | 00 00 01 00 00 00 04 c8 |........|........|
|000034d0| 00 00 03 c8 00 00 00 aa | 00 4b e0 68 2d 2c 00 00 |........|.K.h-,..|
|000034e0| 00 1c 00 aa 00 03 44 54 | 56 55 00 02 00 22 4d 50 |......DT|VU..."MP|
|000034f0| 53 52 00 02 00 46 42 4b | 50 54 00 01 00 6a 4d 57 |SR...FBK|PT...jMW|
|00003500| 42 42 00 00 00 82 08 24 | ff ff 00 00 00 00 00 00 |BB.....$|........|
|00003510| 00 00 48 06 ff ff 00 00 | 01 0e 00 00 00 00 0e c5 |..H.....|........|
|00003520| ff ff 00 00 02 c2 00 00 | 00 00 03 f0 ff ff 00 00 |........|........|
|00003530| 02 5a 00 00 00 00 03 ef | ff ff 00 00 02 7c 00 00 |.Z......|.....|..|
|00003540| 00 00 03 ed ff ff 00 00 | 03 74 00 00 00 00 1d 02 |........|.t......|
|00003550| ff ff 00 00 00 f6 00 00 | 00 00 38 76 ff ff 00 00 |........|..8v....|
|00003560| 02 b4 00 00 00 00 03 f0 | ff ff 00 00 03 c0 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+