home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-08-13 | 9.4 KB | [ TEXT/CWIE]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
You can browse this item here: Grating.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, Sun Aug 13 19:49:57 1995, modified Sun Aug 13 19:49:57 1995, creator 'CWIE', type ASCII, 8904 bytes "Grating.c" , at 0x2348 492 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
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 09 47 72 61 74 69 6e | 67 2e 63 00 00 00 00 00 |..Gratin|g.c.....| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |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 22 c8 00 | 00 01 ec ac 54 40 25 ac |....."..|....T@%.| |00000060| 54 40 25 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |T@%.....|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7c 69 00 00 |........|....|i..| |00000080| 2f 2a 0d 47 72 61 74 69 | 6e 67 2e 63 0d 54 68 69 |/*.Grati|ng.c.Thi| |00000090| 73 20 64 65 6d 6f 20 73 | 68 6f 77 73 20 68 6f 77 |s demo s|hows how| |000000a0| 20 74 6f 20 6c 6f 61 64 | 20 74 68 65 20 63 6c 75 | to load| the clu| |000000b0| 74 20 61 6e 64 20 70 75 | 74 20 61 20 76 69 67 6e |t and pu|t a vign| |000000c0| 65 74 74 65 64 20 67 72 | 61 74 69 6e 67 20 6f 6e |etted gr|ating on| |000000d0| 74 6f 20 74 68 65 0d 73 | 63 72 65 65 6e 2e 20 49 |to the.s|creen. I| |000000e0| 74 20 61 6c 73 6f 20 73 | 61 76 65 73 20 74 68 65 |t also s|aves the| |000000f0| 20 69 6d 61 67 65 20 74 | 6f 20 64 69 73 6b 20 61 | image t|o disk a| |00000100| 73 20 61 20 50 49 43 54 | 20 66 69 6c 65 2e 20 54 |s a PICT| file. T| |00000110| 68 69 73 20 64 65 6d 6f | 20 68 61 73 20 62 65 65 |his demo| has bee| |00000120| 6e 20 6b 65 70 74 0d 61 | 73 20 73 69 6d 70 6c 65 |n kept.a|s simple| |00000130| 20 61 73 20 70 6f 73 73 | 69 62 6c 65 2c 20 74 6f | as poss|ible, to| |00000140| 20 65 6e 68 61 6e 63 65 | 20 72 65 61 64 61 62 69 | enhance| readabi| |00000150| 6c 69 74 79 2c 20 66 6f | 72 73 61 6b 69 6e 67 20 |lity, fo|rsaking | |00000160| 61 63 63 75 72 61 74 65 | 20 63 6f 6e 74 72 6f 6c |accurate| control| |00000170| 20 6f 66 0d 74 69 6d 65 | 20 61 6e 64 20 63 6f 6e | of.time| and con| |00000180| 74 72 61 73 74 20 6f 66 | 20 74 68 65 20 73 74 69 |trast of| the sti| |00000190| 6d 75 6c 75 73 2e 20 54 | 68 65 20 46 6c 69 63 6b |mulus. T|he Flick| |000001a0| 65 72 69 6e 67 47 72 61 | 74 69 6e 67 20 64 65 6d |eringGra|ting dem| |000001b0| 6f 2c 20 6f 6e 20 74 68 | 65 20 6f 74 68 65 72 0d |o, on th|e other.| |000001c0| 68 61 6e 64 2c 20 69 73 | 20 73 6f 6d 65 77 68 61 |hand, is| somewha| |000001d0| 74 20 6d 6f 72 65 20 65 | 6c 61 62 6f 72 61 74 65 |t more e|laborate| |000001e0| 20 61 6e 64 20 70 72 65 | 73 65 6e 74 73 20 61 20 | and pre|sents a | |000001f0| 72 65 73 65 61 72 63 68 | 2d 67 72 61 64 65 20 73 |research|-grade s| |00000200| 74 69 6d 75 6c 75 73 20 | 69 66 20 74 68 65 0d 4c |timulus |if the.L| |00000210| 75 6d 69 6e 61 6e 63 65 | 52 65 63 6f 72 64 2e 68 |uminance|Record.h| |00000220| 20 63 61 6c 69 62 72 61 | 74 69 6f 6e 20 64 61 74 | calibra|tion dat| |00000230| 61 20 61 72 65 20 61 63 | 63 75 72 61 74 65 2e 0d |a are ac|curate..| |00000240| 0d 46 6f 72 20 61 20 72 | 65 61 6c 20 65 78 70 65 |.For a r|eal expe| |00000250| 72 69 6d 65 6e 74 20 74 | 68 65 72 65 20 61 72 65 |riment t|here are| |00000260| 20 73 6f 6d 65 20 72 65 | 66 69 6e 65 6d 65 6e 74 | some re|finement| |00000270| 73 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 63 6f 6e |s you sh|ould con| |00000280| 73 69 64 65 72 2e 20 54 | 68 69 73 20 64 65 6d 6f |sider. T|his demo| |00000290| 0d 74 61 6b 65 73 20 61 | 20 77 68 69 6c 65 20 74 |.takes a| while t| |000002a0| 6f 20 63 72 65 61 74 65 | 20 74 68 65 20 69 6d 61 |o create| the ima| |000002b0| 67 65 20 6f 6e 20 74 68 | 65 20 73 63 72 65 65 6e |ge on th|e screen| |000002c0| 2c 20 62 75 74 20 79 6f | 75 20 70 72 6f 62 61 62 |, but yo|u probab| |000002d0| 6c 79 20 77 61 6e 74 0d | 66 72 61 6d 65 2d 61 63 |ly want.|frame-ac| |000002e0| 63 75 72 61 74 65 20 74 | 69 6d 69 6e 67 20 69 6e |curate t|iming in| |000002f0| 20 79 6f 75 72 20 65 78 | 70 65 72 69 6d 65 6e 74 | your ex|periment| |00000300| 2e 20 59 6f 75 20 63 6f | 75 6c 64 20 65 69 74 68 |. You co|uld eith| |00000310| 65 72 20 63 72 65 61 74 | 65 20 74 68 65 20 69 6d |er creat|e the im| |00000320| 61 67 65 20 69 6e 0d 61 | 6e 20 6f 66 66 73 63 72 |age in.a|n offscr| |00000330| 65 65 6e 20 47 57 6f 72 | 6c 64 20 61 6e 64 20 63 |een GWor|ld and c| |00000340| 6f 70 79 20 69 74 20 74 | 6f 20 74 68 65 20 73 63 |opy it t|o the sc| |00000350| 72 65 65 6e 20 77 69 74 | 68 20 43 6f 70 79 42 69 |reen wit|h CopyBi| |00000360| 74 73 51 75 69 63 6b 6c | 79 2e 20 4f 72 20 79 6f |tsQuickl|y. Or yo| |00000370| 75 20 63 6f 75 6c 64 0d | 73 65 74 20 74 68 65 20 |u could.|set the | |00000380| 63 6c 75 74 20 74 6f 20 | 75 6e 69 66 6f 72 6d 20 |clut to |uniform | |00000390| 67 72 61 79 20 28 65 76 | 65 72 79 20 63 6c 75 74 |gray (ev|ery clut| |000003a0| 20 65 6e 74 72 79 20 65 | 71 75 61 6c 20 74 6f 20 | entry e|qual to | |000003b0| 74 68 65 20 62 61 63 6b | 67 72 6f 75 6e 64 0d 6c |the back|ground.l| |000003c0| 75 6d 69 6e 61 6e 63 65 | 29 20 77 68 69 6c 65 20 |uminance|) while | |000003d0| 79 6f 75 27 72 65 20 63 | 6f 6d 70 75 74 69 6e 67 |you're c|omputing| |000003e0| 20 74 68 65 20 69 6d 61 | 67 65 20 6f 6e 2d 73 63 | the ima|ge on-sc| |000003f0| 72 65 65 6e 2c 20 61 6e | 64 20 74 68 65 6e 20 6c |reen, an|d then l| |00000400| 6f 61 64 20 61 20 67 72 | 61 79 73 63 61 6c 65 0d |oad a gr|ayscale.| |00000410| 72 61 6d 70 20 69 6e 74 | 6f 20 74 68 65 20 63 6c |ramp int|o the cl| |00000420| 75 74 20 77 68 65 6e 20 | 79 6f 75 20 77 61 6e 74 |ut when |you want| |00000430| 20 74 68 65 20 64 69 73 | 70 6c 61 79 20 74 6f 20 | the dis|play to | |00000440| 73 74 61 72 74 2e 20 53 | 69 6d 69 6c 61 72 6c 79 |start. S|imilarly| |00000450| 20 79 6f 75 20 63 61 6e | 20 6d 61 6b 65 0d 74 68 | you can| make.th| |00000460| 65 20 69 6d 61 67 65 20 | 64 69 73 61 70 70 65 61 |e image |disappea| |00000470| 72 20 62 79 20 6c 6f 61 | 64 69 6e 67 20 61 20 6e |r by loa|ding a n| |00000480| 65 77 20 69 6d 61 67 65 | 2c 20 63 61 6c 6c 69 6e |ew image|, callin| |00000490| 67 20 45 72 61 73 65 52 | 65 63 74 28 29 2c 20 6f |g EraseR|ect(), o| |000004a0| 72 20 6c 6f 61 64 69 6e | 67 20 0d 61 20 75 6e 69 |r loadin|g .a uni| |000004b0| 66 6f 72 6d 2d 67 72 61 | 79 20 63 6c 75 74 2e 0d |form-gra|y clut..| |000004c0| 0d 41 6e 6f 74 68 65 72 | 20 69 73 73 75 65 20 74 |.Another| issue t| |000004d0| 68 61 74 20 6d 61 74 74 | 65 72 73 20 66 6f 72 20 |hat matt|ers for | |000004e0| 61 20 72 65 61 6c 20 65 | 78 70 65 72 69 6d 65 6e |a real e|xperimen| |000004f0| 74 20 69 73 20 67 61 6d | 6d 61 20 63 6f 72 72 65 |t is gam|ma corre| |00000500| 63 74 69 6f 6e 2e 20 54 | 68 65 0d 6e 75 6d 62 65 |ction. T|he.numbe| |00000510| 72 73 20 6c 6f 61 64 65 | 64 20 69 6e 74 6f 20 74 |rs loade|d into t| |00000520| 68 65 20 63 6c 75 74 20 | 61 72 65 20 66 61 69 74 |he clut |are fait| |00000530| 68 66 75 6c 6c 79 20 74 | 72 61 6e 73 66 6f 72 6d |hfully t|ransform| |00000540| 65 64 20 69 6e 74 6f 20 | 76 6f 6c 74 61 67 65 73 |ed into |voltages| |00000550| 20 62 79 20 74 68 65 0d | 74 68 72 65 65 20 64 69 | by the.|three di| |00000560| 67 69 74 61 6c 2d 74 6f | 2d 61 6e 61 6c 6f 67 20 |gital-to|-analog | |00000570| 63 6f 6e 76 65 72 74 65 | 72 73 20 6f 6e 20 79 6f |converte|rs on yo| |00000580| 75 72 20 76 69 64 65 6f | 20 63 61 72 64 2c 20 62 |ur video| card, b| |00000590| 75 74 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |ut the r|esulting| |000005a0| 0d 6c 75 6d 69 6e 61 6e | 63 65 20 70 72 6f 64 75 |.luminan|ce produ| |000005b0| 63 65 64 20 6f 6e 20 79 | 6f 75 72 20 6d 6f 6e 69 |ced on y|our moni| |000005c0| 74 6f 72 20 77 69 6c 6c | 20 62 65 20 61 6e 20 61 |tor will| be an a| |000005d0| 70 70 72 6f 78 69 6d 61 | 74 65 6c 79 20 70 61 72 |pproxima|tely par| |000005e0| 61 62 6f 6c 69 63 20 66 | 75 6e 63 74 69 6f 6e 0d |abolic f|unction.| |000005f0| 6f 66 20 74 68 65 20 76 | 69 64 65 6f 20 76 6f 6c |of the v|ideo vol| |00000600| 74 61 67 65 2e 20 41 70 | 70 6c 65 20 70 72 6f 76 |tage. Ap|ple prov| |00000610| 69 64 65 73 20 63 72 75 | 64 65 20 67 61 6d 6d 61 |ides cru|de gamma| |00000620| 20 63 6f 72 72 65 63 74 | 69 6f 6e 20 62 79 20 6d | correct|ion by m| |00000630| 65 61 6e 73 20 6f 66 20 | 61 0d 67 65 6e 65 72 69 |eans of |a.generi| |00000640| 63 20 38 2d 62 69 74 20 | 67 61 6d 6d 61 20 74 61 |c 8-bit |gamma ta| |00000650| 62 6c 65 20 69 6e 20 74 | 68 65 20 76 69 64 65 6f |ble in t|he video| |00000660| 20 64 72 69 76 65 72 2c | 20 77 68 69 63 68 20 64 | driver,| which d| |00000670| 6f 65 73 20 6d 61 6b 65 | 20 74 68 69 6e 67 73 20 |oes make| things | |00000680| 6c 6f 6f 6b 0d 62 65 74 | 74 65 72 2c 20 62 75 74 |look.bet|ter, but| |00000690| 20 69 73 20 6e 6f 74 20 | 61 63 63 75 72 61 74 65 | is not |accurate| |000006a0| 6c 79 20 6d 61 74 63 68 | 65 64 20 74 6f 20 74 68 |ly match|ed to th| |000006b0| 65 20 67 61 6d 6d 61 20 | 6f 66 20 79 6f 75 72 20 |e gamma |of your | |000006c0| 70 61 72 74 69 63 75 6c | 61 72 20 6d 6f 6e 69 74 |particul|ar monit| |000006d0| 6f 72 2c 0d 77 68 69 63 | 68 20 64 65 70 65 6e 64 |or,.whic|h depend| |000006e0| 73 20 6f 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |s on the| current| |000006f0| 20 73 65 74 74 69 6e 67 | 73 20 6f 66 20 69 74 73 | setting|s of its| |00000700| 20 62 72 69 67 68 74 6e | 65 73 73 20 61 6e 64 20 | brightn|ess and | |00000710| 63 6f 6e 74 72 61 73 74 | 20 6b 6e 6f 62 73 2e 0d |contrast| knobs..| |00000720| 46 75 72 74 68 65 72 6d | 6f 72 65 20 74 68 65 20 |Furtherm|ore the | |00000730| 41 70 70 6c 65 20 38 2d | 62 69 74 20 67 61 6d 6d |Apple 8-|bit gamm| |00000740| 61 2d 63 6f 72 72 65 63 | 74 69 6f 6e 20 73 63 68 |a-correc|tion sch| |00000750| 65 6d 65 2c 20 77 68 69 | 63 68 20 73 69 6d 70 6c |eme, whi|ch simpl| |00000760| 79 20 74 72 61 6e 73 66 | 6f 72 6d 73 20 74 68 65 |y transf|orms the| |00000770| 0d 6e 6f 6d 69 6e 61 6c | 20 38 2d 62 69 74 20 63 |.nominal| 8-bit c| |00000780| 6c 75 74 20 76 61 6c 75 | 65 20 69 6e 74 6f 20 61 |lut valu|e into a| |00000790| 20 6e 65 77 20 38 2d 62 | 69 74 20 63 6c 75 74 20 | new 8-b|it clut | |000007a0| 76 61 6c 75 65 2c 20 6e | 65 63 65 73 73 61 72 69 |value, n|ecessari| |000007b0| 6c 79 20 72 65 73 74 72 | 69 63 74 73 20 74 68 65 |ly restr|icts the| |000007c0| 0d 72 61 6e 67 65 20 6f | 66 20 61 76 61 69 6c 61 |.range o|f availa| |000007d0| 62 6c 65 20 76 61 6c 75 | 65 73 2c 20 6d 61 70 70 |ble valu|es, mapp| |000007e0| 69 6e 67 20 73 65 76 65 | 72 61 6c 20 6f 6e 74 6f |ing seve|ral onto| |000007f0| 20 6f 6e 65 20 6f 75 74 | 70 75 74 20 76 61 6c 75 | one out|put valu| |00000800| 65 2c 20 61 6e 64 20 6f | 6d 69 74 74 69 6e 67 0d |e, and o|mitting.| |00000810| 73 6f 6d 65 20 6f 75 74 | 70 75 74 20 76 61 6c 75 |some out|put valu| |00000820| 65 73 2e 20 49 6e 20 6f | 74 68 65 72 20 77 6f 72 |es. In o|ther wor| |00000830| 64 73 20 79 6f 75 72 20 | 6c 75 6d 69 6e 61 6e 63 |ds your |luminanc| |00000840| 65 73 20 77 69 6c 6c 20 | 62 65 20 38 2d 62 69 74 |es will |be 8-bit| |00000850| 20 71 75 61 6e 74 69 7a | 65 64 0d 74 77 69 63 65 | quantiz|ed.twice| |00000860| 2c 20 62 6f 74 68 20 62 | 65 66 6f 72 65 20 61 6e |, both b|efore an| |00000870| 64 20 61 66 74 65 72 20 | 67 61 6d 6d 61 20 63 6f |d after |gamma co| |00000880| 72 72 65 63 74 69 6f 6e | 2e 20 49 74 20 69 73 20 |rrection|. It is | |00000890| 70 72 65 66 65 72 61 62 | 6c 65 20 74 6f 20 64 6f |preferab|le to do| |000008a0| 20 67 61 6d 6d 61 0d 63 | 6f 72 72 65 63 74 69 6f | gamma.c|orrectio| |000008b0| 6e 20 66 69 72 73 74 2c | 20 77 69 74 68 6f 75 74 |n first,| without| |000008c0| 20 71 75 61 6e 74 69 7a | 61 74 69 6f 6e 2e 20 54 | quantiz|ation. T| |000008d0| 68 65 72 65 66 6f 72 65 | 20 49 20 73 75 67 67 65 |herefore| I sugge| |000008e0| 73 74 20 79 6f 75 20 65 | 6c 69 6d 69 6e 61 74 65 |st you e|liminate| |000008f0| 0d 41 70 70 6c 65 27 73 | 20 67 61 6d 6d 61 20 63 |.Apple's| gamma c| |00000900| 6f 72 72 65 63 74 69 6f | 6e 2c 20 62 79 20 63 61 |orrectio|n, by ca| |00000910| 6c 6c 69 6e 67 20 47 44 | 55 6e 63 6f 72 72 65 63 |lling GD|Uncorrec| |00000920| 74 65 64 47 61 6d 6d 61 | 28 29 2c 20 61 6e 64 20 |tedGamma|(), and | |00000930| 75 73 65 20 74 68 65 0d | 4c 75 6d 69 6e 61 6e 63 |use the.|Luminanc| |00000940| 65 2e 63 20 70 61 63 6b | 61 67 65 20 74 6f 20 64 |e.c pack|age to d| |00000950| 6f 20 67 61 6d 6d 61 20 | 63 6f 72 72 65 63 74 69 |o gamma |correcti| |00000960| 6f 6e 2e 20 54 68 61 74 | 20 70 61 63 6b 61 67 65 |on. That| package| |00000970| 20 69 6d 70 6c 65 6d 65 | 6e 74 73 20 74 68 65 0d | impleme|nts the.| |00000980| 70 75 62 6c 69 73 68 65 | 64 20 61 6c 67 6f 72 69 |publishe|d algori| |00000990| 74 68 6d 20 6f 66 20 50 | 65 6c 6c 69 20 61 6e 64 |thm of P|elli and| |000009a0| 20 5a 68 61 6e 67 20 28 | 31 39 39 31 29 2e 20 54 | Zhang (|1991). T| |000009b0| 68 65 20 46 6c 69 63 6b | 65 72 69 6e 67 47 72 61 |he Flick|eringGra| |000009c0| 74 69 6e 67 20 64 65 6d | 6f 20 75 73 65 73 0d 4c |ting dem|o uses.L| |000009d0| 75 6d 69 6e 61 6e 63 65 | 2e 63 2e 0d 0d 57 68 79 |uminance|.c...Why| |000009e0| 20 6e 6f 74 20 6d 65 72 | 67 65 20 6d 61 69 6e 28 | not mer|ge main(| |000009f0| 29 20 61 6e 64 20 47 72 | 61 74 69 6e 67 28 29 3f |) and Gr|ating()?| |00000a00| 20 54 68 65 20 63 61 6c | 6c 20 74 6f 20 52 65 71 | The cal|l to Req| |00000a10| 75 69 72 65 28 29 20 63 | 68 65 63 6b 73 20 66 6f |uire() c|hecks fo| |00000a20| 72 20 61 6e 79 20 6e 65 | 65 64 65 64 0d 68 61 72 |r any ne|eded.har| |00000a30| 64 77 61 72 65 2e 20 49 | 74 20 69 73 20 76 69 74 |dware. I|t is vit| |00000a40| 61 6c 20 74 68 61 74 20 | 61 20 74 65 73 74 20 66 |al that |a test f| |00000a50| 6f 72 20 74 68 65 20 70 | 72 65 73 65 6e 63 65 20 |or the p|resence | |00000a60| 6f 66 20 61 20 6e 65 65 | 64 65 64 20 66 6c 6f 61 |of a nee|ded floa| |00000a70| 74 69 6e 67 20 70 6f 69 | 6e 74 0d 75 6e 69 74 20 |ting poi|nt.unit | |00000a80| 62 65 20 64 6f 6e 65 20 | 62 65 66 6f 72 65 20 65 |be done |before e| |00000a90| 6e 74 65 72 69 6e 67 20 | 61 6e 79 20 72 6f 75 74 |ntering |any rout| |00000aa0| 69 6e 65 2c 20 65 2e 67 | 2e 20 47 72 61 74 69 6e |ine, e.g|. Gratin| |00000ab0| 67 28 29 2c 20 74 68 61 | 74 20 75 73 65 73 20 74 |g(), tha|t uses t| |00000ac0| 68 65 20 66 70 75 2c 0d | 62 65 63 61 75 73 65 20 |he fpu,.|because | |00000ad0| 74 68 65 20 54 48 49 4e | 4b 20 43 20 63 6f 6d 70 |the THIN|K C comp| |00000ae0| 69 6c 65 72 20 74 79 70 | 69 63 61 6c 6c 79 20 70 |iler typ|ically p| |00000af0| 72 6f 64 75 63 65 73 20 | 63 6f 64 65 20 74 68 61 |roduces |code tha| |00000b00| 74 20 61 63 63 65 73 73 | 65 73 20 74 68 65 20 66 |t access|es the f| |00000b10| 70 75 2c 20 74 6f 0d 73 | 61 76 65 20 66 70 75 20 |pu, to.s|ave fpu | |00000b20| 72 65 67 69 73 74 65 72 | 73 2c 20 61 74 20 74 68 |register|s, at th| |00000b30| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 74 |e beginn|ing of t| |00000b40| 68 65 20 72 6f 75 74 69 | 6e 65 2c 20 73 6f 20 61 |he routi|ne, so a| |00000b50| 6e 79 20 73 75 62 73 65 | 71 75 65 6e 74 20 63 68 |ny subse|quent ch| |00000b60| 65 63 6b 0d 77 6f 75 6c | 64 20 62 65 20 74 6f 6f |eck.woul|d be too| |00000b70| 20 6c 61 74 65 2e 0d 0d | 48 49 53 54 4f 52 59 3a | late...|HISTORY:| |00000b80| 0d 32 2f 37 2f 39 33 09 | 64 67 70 20 77 72 6f 74 |.2/7/93.|dgp wrot| |00000b90| 65 20 69 74 2c 20 61 73 | 20 61 6e 20 61 6e 73 77 |e it, as| an answ| |00000ba0| 65 72 20 74 6f 20 71 75 | 65 73 74 69 6f 6e 73 20 |er to qu|estions | |00000bb0| 66 72 6f 6d 20 42 69 6c | 6c 20 4d 65 72 69 67 61 |from Bil|l Meriga| |00000bc0| 6e 20 61 6e 64 20 44 61 | 76 69 64 20 42 72 61 69 |n and Da|vid Brai| |00000bd0| 6e 61 72 64 2e 0d 32 2f | 31 38 2f 39 33 09 64 67 |nard..2/|18/93.dg| |00000be0| 70 09 61 64 64 65 64 20 | 66 70 75 20 74 65 73 74 |p.added |fpu test| |00000bf0| 2e 0d 32 2f 32 33 2f 39 | 33 09 64 67 70 09 75 73 |..2/23/9|3.dgp.us| |00000c00| 65 20 6e 65 77 20 47 44 | 4f 70 65 6e 57 69 6e 64 |e new GD|OpenWind| |00000c10| 6f 77 31 20 61 6e 64 20 | 47 44 44 69 73 70 6f 73 |ow1 and |GDDispos| |00000c20| 65 57 69 6e 64 6f 77 31 | 2e 0d 34 2f 31 38 2f 39 |eWindow1|..4/18/9| |00000c30| 33 09 64 67 70 09 73 75 | 70 70 6f 72 74 20 64 69 |3.dgp.su|pport di| |00000c40| 72 65 63 74 54 79 70 65 | 2e 0d 37 2f 37 2f 39 33 |rectType|..7/7/93| |00000c50| 09 64 67 70 09 70 72 65 | 66 65 72 20 73 63 72 65 |.dgp.pre|fer scre| |00000c60| 65 6e 20 31 2e 20 41 64 | 64 65 64 20 53 63 72 6f |en 1. Ad|ded Scro| |00000c70| 6c 6c 52 65 63 74 20 66 | 6f 72 20 63 6f 6d 70 61 |llRect f|or compa| |00000c80| 74 69 62 69 6c 69 74 79 | 20 77 69 74 68 20 52 61 |tibility| with Ra| |00000c90| 64 69 75 73 20 50 6f 77 | 65 72 56 69 65 77 2e 0d |dius Pow|erView..| |00000ca0| 31 30 2f 32 2f 39 33 09 | 64 67 70 09 61 64 64 65 |10/2/93.|dgp.adde| |00000cb0| 64 20 53 41 56 45 5f 50 | 49 43 54 20 74 6f 20 74 |d SAVE_P|ICT to t| |00000cc0| 65 73 74 20 50 69 78 4d | 61 70 54 6f 50 49 43 54 |est PixM|apToPICT| |00000cd0| 28 29 2e 0d 34 2f 32 37 | 2f 39 34 20 64 67 70 20 |()..4/27|/94 dgp | |00000ce0| 6e 6f 77 20 61 73 6b 20 | 75 73 65 72 20 77 68 65 |now ask |user whe| |00000cf0| 74 68 65 72 20 74 6f 20 | 73 61 76 65 20 67 72 61 |ther to |save gra| |00000d00| 74 69 6e 67 20 61 73 20 | 50 49 43 54 2e 0d 38 2f |ting as |PICT..8/| |00000d10| 31 31 2f 39 34 09 64 67 | 70 20 64 6f 6e 27 74 20 |11/94.dg|p don't | |00000d20| 72 65 64 65 66 69 6e 65 | 20 22 73 69 6e 22 2e 0d |redefine| "sin"..| |00000d30| 39 2f 35 2f 39 34 20 64 | 67 70 20 72 65 6d 6f 76 |9/5/94 d|gp remov| |00000d40| 65 64 20 61 73 73 75 6d | 70 74 69 6f 6e 20 69 6e |ed assum|ption in| |00000d50| 20 70 72 69 6e 74 66 27 | 73 20 74 68 61 74 20 69 | printf'|s that i| |00000d60| 6e 74 3d 3d 73 68 6f 72 | 74 2e 0d 33 2f 32 30 2f |nt==shor|t..3/20/| |00000d70| 39 35 20 64 67 70 20 72 | 65 6d 6f 76 65 64 20 53 |95 dgp r|emoved S| |00000d80| 65 6c 65 63 74 57 69 6e | 64 6f 77 28 29 20 77 6f |electWin|dow() wo| |00000d90| 72 6b 61 72 6f 75 6e 64 | 20 66 6f 72 20 43 57 35 |rkaround| for CW5| |00000da0| 20 53 49 4f 55 58 20 62 | 75 67 2e 0d 34 2f 31 31 | SIOUX b|ug..4/11| |00000db0| 2f 39 35 20 64 67 70 20 | 73 65 74 20 61 6e 64 20 |/95 dgp |set and | |00000dc0| 72 65 73 74 6f 72 65 20 | 64 69 73 70 6c 61 79 20 |restore |display | |00000dd0| 64 65 70 74 68 20 61 6e | 64 20 63 6f 6c 6f 72 2e |depth an|d color.| |00000de0| 20 55 73 65 20 43 68 6f | 6f 73 65 53 63 72 65 65 | Use Cho|oseScree| |00000df0| 6e 28 29 2e 0d 36 2f 33 | 30 2f 39 35 20 64 67 70 |n()..6/3|0/95 dgp| |00000e00| 20 66 69 78 65 64 20 70 | 61 67 65 52 65 63 74 20 | fixed p|ageRect | |00000e10| 69 6e 20 63 61 6c 6c 20 | 74 6f 20 57 69 6e 64 6f |in call |to Windo| |00000e20| 77 54 6f 45 50 53 2e 20 | 49 27 6d 20 73 75 72 70 |wToEPS. |I'm surp| |00000e30| 72 69 73 65 64 20 6e 6f | 20 6f 6e 65 20 72 65 70 |rised no| one rep| |00000e40| 6f 72 74 65 64 20 74 68 | 61 74 0d 09 09 09 74 68 |orted th|at....th| |00000e50| 65 20 67 72 61 74 69 6e | 67 2e 65 70 73 20 66 69 |e gratin|g.eps fi| |00000e60| 6c 65 20 77 61 73 20 75 | 73 65 6c 65 73 73 2e 20 |le was u|seless. | |00000e70| 4f 6b 20 6e 6f 77 2e 0d | 2a 2f 0d 23 69 6e 63 6c |Ok now..|*/.#incl| |00000e80| 75 64 65 20 22 56 69 64 | 65 6f 54 6f 6f 6c 62 6f |ude "Vid|eoToolbo| |00000e90| 78 2e 68 22 0d 23 69 66 | 20 55 4e 49 56 45 52 53 |x.h".#if| UNIVERS| |00000ea0| 41 4c 5f 48 45 41 44 45 | 52 53 0d 09 23 69 6e 63 |AL_HEADE|RS..#inc| |00000eb0| 6c 75 64 65 20 3c 4c 6f | 77 4d 65 6d 2e 68 3e 0d |lude <Lo|wMem.h>.| |00000ec0| 23 65 6c 73 65 0d 09 23 | 64 65 66 69 6e 65 20 4c |#else..#|define L| |00000ed0| 4d 47 65 74 4d 42 61 72 | 48 65 69 67 68 74 28 29 |MGetMBar|Height()| |00000ee0| 20 28 2a 20 28 73 68 6f | 72 74 20 2a 29 20 30 78 | (* (sho|rt *) 0x| |00000ef0| 30 42 41 41 29 0d 09 23 | 64 65 66 69 6e 65 20 4c |0BAA)..#|define L| |00000f00| 4d 53 65 74 4d 42 61 72 | 48 65 69 67 68 74 28 4d |MSetMBar|Height(M| |00000f10| 42 61 72 48 65 69 67 68 | 74 56 61 6c 75 65 29 20 |BarHeigh|tValue) | |00000f20| 28 28 2a 20 28 73 68 6f | 72 74 20 2a 29 20 30 78 |((* (sho|rt *) 0x| |00000f30| 30 42 41 41 29 20 3d 20 | 28 4d 42 61 72 48 65 69 |0BAA) = |(MBarHei| |00000f40| 67 68 74 56 61 6c 75 65 | 29 29 0d 23 65 6e 64 69 |ghtValue|)).#endi| |00000f50| 66 0d 76 6f 69 64 20 47 | 72 61 74 69 6e 67 28 76 |f.void G|rating(v| |00000f60| 6f 69 64 29 3b 0d 23 64 | 65 66 69 6e 65 20 53 49 |oid);.#d|efine SI| |00000f70| 5a 45 20 33 30 30 0d 0d | 76 6f 69 64 20 6d 61 69 |ZE 300..|void mai| |00000f80| 6e 28 76 6f 69 64 29 0d | 7b 0d 09 53 74 61 63 6b |n(void).|{..Stack| |00000f90| 47 72 6f 77 28 31 30 30 | 30 30 29 3b 0d 09 52 65 |Grow(100|00);..Re| |00000fa0| 71 75 69 72 65 28 67 65 | 73 74 61 6c 74 38 42 69 |quire(ge|stalt8Bi| |00000fb0| 74 51 44 29 3b 0d 09 47 | 72 61 74 69 6e 67 28 29 |tQD);..G|rating()| |00000fc0| 3b 0d 7d 0d 0d 76 6f 69 | 64 20 47 72 61 74 69 6e |;.}..voi|d Gratin| |00000fd0| 67 28 76 6f 69 64 29 0d | 7b 0d 09 73 68 6f 72 74 |g(void).|{..short| |00000fe0| 20 69 2c 6a 2c 65 72 72 | 6f 72 2c 63 6c 75 74 53 | i,j,err|or,clutS| |00000ff0| 69 7a 65 2c 70 69 78 65 | 6c 53 69 7a 65 2c 6f 6c |ize,pixe|lSize,ol| |00001000| 64 50 69 78 65 6c 53 69 | 7a 65 2c 6f 6c 64 49 73 |dPixelSi|ze,oldIs| |00001010| 43 6f 6c 6f 72 2c 6d 6f | 64 65 3b 0d 09 73 68 6f |Color,mo|de;..sho| |00001020| 72 74 20 70 72 65 66 65 | 72 72 65 64 50 69 78 65 |rt prefe|rredPixe| |00001030| 6c 53 69 7a 65 5b 36 5d | 3d 7b 38 2c 33 32 2c 31 |lSize[6]|={8,32,1| |00001040| 36 2c 34 2c 32 2c 31 7d | 3b 09 2f 2f 20 4f 72 64 |6,4,2,1}|;.// Ord| |00001050| 65 72 20 6f 66 20 70 72 | 65 66 65 72 65 6e 63 65 |er of pr|eference| |00001060| 0d 09 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |..GDHand|le devic| |00001070| 65 3b 0d 09 43 6f 6c 6f | 72 53 70 65 63 20 74 61 |e;..Colo|rSpec ta| |00001080| 62 6c 65 5b 32 35 36 5d | 3b 0d 09 57 69 6e 64 6f |ble[256]|;..Windo| |00001090| 77 50 74 72 20 77 69 6e | 64 6f 77 2c 6f 6c 64 50 |wPtr win|dow,oldP| |000010a0| 6f 72 74 3b 0d 09 52 65 | 63 74 20 72 3b 0d 09 64 |ort;..Re|ct r;..d| |000010b0| 6f 75 62 6c 65 20 61 2c | 66 58 5b 53 49 5a 45 5d |ouble a,|fX[SIZE]| |000010c0| 2c 66 59 5b 53 49 5a 45 | 5d 3b 0d 09 63 68 61 72 |,fY[SIZE|];..char| |000010d0| 20 73 74 72 69 6e 67 5b | 31 30 30 5d 3b 0d 09 50 | string[|100];..P| |000010e0| 6f 69 6e 74 20 70 74 3b | 0d 09 42 6f 6f 6c 65 61 |oint pt;|..Boolea| |000010f0| 6e 20 73 61 76 65 50 69 | 63 74 3d 31 2c 73 61 76 |n savePi|ct=1,sav| |00001100| 65 45 50 53 3d 31 3b 0d | 09 43 6f 6c 6f 72 54 61 |eEPS=1;.|.ColorTa| |00001110| 62 6c 65 20 2a 2a 63 74 | 3b 0d 09 0d 09 61 73 73 |ble **ct|;....ass| |00001120| 65 72 74 28 53 74 61 63 | 6b 53 70 61 63 65 28 29 |ert(Stac|kSpace()| |00001130| 3e 35 30 30 30 29 3b 0d | 09 23 69 66 20 28 54 48 |>5000);.|.#if (TH| |00001140| 49 4e 4b 5f 43 20 7c 7c | 20 54 48 49 4e 4b 5f 43 |INK_C ||| THINK_C| |00001150| 50 4c 55 53 20 7c 7c 20 | 53 59 4d 41 4e 54 45 43 |PLUS || |SYMANTEC| |00001160| 5f 43 29 0d 09 09 63 6f | 6e 73 6f 6c 65 5f 6f 70 |_C)...co|nsole_op| |00001170| 74 69 6f 6e 73 2e 74 6f | 70 20 3d 20 30 3b 0d 09 |tions.to|p = 0;..| |00001180| 09 63 6f 6e 73 6f 6c 65 | 5f 6f 70 74 69 6f 6e 73 |.console|_options| |00001190| 2e 6c 65 66 74 20 3d 20 | 30 3b 0d 09 09 63 6f 6e |.left = |0;...con| |000011a0| 73 6f 6c 65 5f 6f 70 74 | 69 6f 6e 73 2e 6e 72 6f |sole_opt|ions.nro| |000011b0| 77 73 20 3d 20 34 3b 0d | 09 09 63 6f 6e 73 6f 6c |ws = 4;.|..consol| |000011c0| 65 5f 6f 70 74 69 6f 6e | 73 2e 6e 63 6f 6c 73 20 |e_option|s.ncols | |000011d0| 3d 20 36 30 3b 0d 09 09 | 70 72 69 6e 74 66 28 22 |= 60;...|printf("| |000011e0| 5c 6e 22 29 3b 0d 09 23 | 65 6c 69 66 20 5f 5f 4d |\n");..#|elif __M| |000011f0| 57 45 52 4b 53 5f 5f 0d | 09 09 53 49 4f 55 58 53 |WERKS__.|..SIOUXS| |00001200| 65 74 74 69 6e 67 73 2e | 74 6f 70 70 69 78 65 6c |ettings.|toppixel| |00001210| 3d 4c 4d 47 65 74 4d 42 | 61 72 48 65 69 67 68 74 |=LMGetMB|arHeight| |00001220| 28 29 2b 31 3b 09 2f 2f | 20 61 6c 6c 6f 77 20 66 |()+1;.//| allow f| |00001230| 6f 72 20 6d 65 6e 75 20 | 62 61 72 20 6f 6e 6c 79 |or menu |bar only| |00001240| 0d 09 09 53 49 4f 55 58 | 53 65 74 74 69 6e 67 73 |...SIOUX|Settings| |00001250| 2e 6c 65 66 74 70 69 78 | 65 6c 3d 31 3b 0d 09 09 |.leftpix|el=1;...| |00001260| 53 49 4f 55 58 53 65 74 | 74 69 6e 67 73 2e 72 6f |SIOUXSet|tings.ro| |00001270| 77 73 3d 34 3b 0d 09 09 | 53 49 4f 55 58 53 65 74 |ws=4;...|SIOUXSet| |00001280| 74 69 6e 67 73 2e 63 6f | 6c 75 6d 6e 73 3d 36 30 |tings.co|lumns=60| |00001290| 3b 0d 09 09 53 49 4f 55 | 58 53 65 74 74 69 6e 67 |;...SIOU|XSetting| |000012a0| 73 2e 61 75 74 6f 63 6c | 6f 73 65 6f 6e 71 75 69 |s.autocl|oseonqui| |000012b0| 74 3d 30 3b 0d 09 09 53 | 49 4f 55 58 53 65 74 74 |t=0;...S|IOUXSett| |000012c0| 69 6e 67 73 2e 73 68 6f | 77 73 74 61 74 75 73 6c |ings.sho|wstatusl| |000012d0| 69 6e 65 3d 30 3b 0d 09 | 09 53 49 4f 55 58 53 65 |ine=0;..|.SIOUXSe| |000012e0| 74 74 69 6e 67 73 2e 61 | 73 6b 74 6f 73 61 76 65 |ttings.a|sktosave| |000012f0| 6f 6e 63 6c 6f 73 65 3d | 30 3b 0d 09 09 70 72 69 |onclose=|0;...pri| |00001300| 6e 74 66 28 22 5c 6e 22 | 29 3b 0d 09 23 65 6c 73 |ntf("\n"|);..#els| |00001310| 65 0d 09 09 49 6e 69 74 | 47 72 61 66 28 26 71 64 |e...Init|Graf(&qd| |00001320| 2e 74 68 65 50 6f 72 74 | 29 3b 0d 09 09 49 6e 69 |.thePort|);...Ini| |00001330| 74 46 6f 6e 74 73 28 29 | 3b 0d 09 09 49 6e 69 74 |tFonts()|;...Init| |00001340| 57 69 6e 64 6f 77 73 28 | 29 3b 0d 09 09 49 6e 69 |Windows(|);...Ini| |00001350| 74 43 75 72 73 6f 72 28 | 29 3b 0d 09 23 65 6e 64 |tCursor(|);..#end| |00001360| 69 66 0d 09 70 72 69 6e | 74 66 28 22 57 65 6c 63 |if..prin|tf("Welc| |00001370| 6f 6d 65 20 74 6f 20 47 | 72 61 74 69 6e 67 2e 5c |ome to G|rating.\| |00001380| 6e 22 29 3b 0d 09 47 65 | 74 50 6f 72 74 28 26 6f |n");..Ge|tPort(&o| |00001390| 6c 64 50 6f 72 74 29 3b | 0d 0d 09 2f 2a 20 46 69 |ldPort);|.../* Fi| |000013a0| 6e 64 20 64 65 76 69 63 | 65 20 63 6f 72 72 65 73 |nd devic|e corres| |000013b0| 70 6f 6e 64 69 6e 67 20 | 74 6f 20 74 68 65 20 65 |ponding |to the e| |000013c0| 78 70 65 72 69 6d 65 6e | 74 61 6c 20 73 63 72 65 |xperimen|tal scre| |000013d0| 65 6e 2e 20 2a 2f 0d 09 | 66 6f 72 28 69 3d 38 3b |en. */..|for(i=8;| |000013e0| 69 3e 3d 30 3b 69 2d 2d | 29 7b 0d 09 09 64 65 76 |i>=0;i--|){...dev| |000013f0| 69 63 65 20 3d 20 47 65 | 74 53 63 72 65 65 6e 44 |ice = Ge|tScreenD| |00001400| 65 76 69 63 65 28 69 29 | 3b 0d 09 09 69 66 28 64 |evice(i)|;...if(d| |00001410| 65 76 69 63 65 21 3d 4e | 55 4c 4c 29 20 62 72 65 |evice!=N|ULL) bre| |00001420| 61 6b 3b 0d 09 7d 0d 09 | 64 6f 7b 0d 09 09 69 66 |ak;..}..|do{...if| |00001430| 28 47 65 74 53 63 72 65 | 65 6e 44 65 76 69 63 65 |(GetScre|enDevice| |00001440| 28 31 29 21 3d 4e 55 4c | 4c 29 69 3d 43 68 6f 6f |(1)!=NUL|L)i=Choo| |00001450| 73 65 53 63 72 65 65 6e | 28 69 2c 22 57 68 69 63 |seScreen|(i,"Whic| |00001460| 68 20 73 63 72 65 65 6e | 3f 22 29 3b 0d 09 09 65 |h screen|?");...e| |00001470| 6c 73 65 20 69 3d 30 3b | 0d 09 09 64 65 76 69 63 |lse i=0;|...devic| |00001480| 65 3d 47 65 74 53 63 72 | 65 65 6e 44 65 76 69 63 |e=GetScr|eenDevic| |00001490| 65 28 69 29 3b 0d 09 7d | 77 68 69 6c 65 28 64 65 |e(i);..}|while(de| |000014a0| 76 69 63 65 3d 3d 4e 55 | 4c 4c 29 3b 0d 09 0d 09 |vice==NU|LL);....| |000014b0| 2f 2f 20 54 72 79 20 74 | 6f 20 67 65 74 20 74 68 |// Try t|o get th| |000014c0| 65 20 62 65 73 74 20 70 | 6f 73 73 69 62 6c 65 20 |e best p|ossible | |000014d0| 70 69 78 65 6c 53 69 7a | 65 2e 0d 09 6f 6c 64 50 |pixelSiz|e...oldP| |000014e0| 69 78 65 6c 53 69 7a 65 | 3d 28 2a 2a 28 2a 2a 64 |ixelSize|=(**(**d| |000014f0| 65 76 69 63 65 29 2e 67 | 64 50 4d 61 70 29 2e 70 |evice).g|dPMap).p| |00001500| 69 78 65 6c 53 69 7a 65 | 3b 0d 09 6f 6c 64 49 73 |ixelSize|;..oldIs| |00001510| 43 6f 6c 6f 72 3d 54 65 | 73 74 44 65 76 69 63 65 |Color=Te|stDevice| |00001520| 41 74 74 72 69 62 75 74 | 65 28 64 65 76 69 63 65 |Attribut|e(device| |00001530| 2c 67 64 44 65 76 54 79 | 70 65 29 3b 0d 09 69 66 |,gdDevTy|pe);..if| |00001540| 28 6f 6c 64 50 69 78 65 | 6c 53 69 7a 65 21 3d 70 |(oldPixe|lSize!=p| |00001550| 72 65 66 65 72 72 65 64 | 50 69 78 65 6c 53 69 7a |referred|PixelSiz| |00001560| 65 5b 30 5d 20 26 26 20 | 4e 65 77 50 61 6c 65 74 |e[0] && |NewPalet| |00001570| 74 65 4d 61 6e 61 67 65 | 72 28 29 29 7b 0d 09 09 |teManage|r()){...| |00001580| 66 6f 72 28 69 3d 30 3b | 69 3c 73 69 7a 65 6f 66 |for(i=0;|i<sizeof| |00001590| 28 70 72 65 66 65 72 72 | 65 64 50 69 78 65 6c 53 |(preferr|edPixelS| |000015a0| 69 7a 65 29 2f 73 69 7a | 65 6f 66 28 2a 70 72 65 |ize)/siz|eof(*pre| |000015b0| 66 65 72 72 65 64 50 69 | 78 65 6c 53 69 7a 65 29 |ferredPi|xelSize)| |000015c0| 3b 69 2b 2b 29 7b 0d 09 | 09 09 69 66 28 6f 6c 64 |;i++){..|..if(old| |000015d0| 50 69 78 65 6c 53 69 7a | 65 3d 3d 70 72 65 66 65 |PixelSiz|e==prefe| |000015e0| 72 72 65 64 50 69 78 65 | 6c 53 69 7a 65 5b 69 5d |rredPixe|lSize[i]| |000015f0| 20 26 26 20 6f 6c 64 49 | 73 43 6f 6c 6f 72 29 62 | && oldI|sColor)b| |00001600| 72 65 61 6b 3b 0d 09 09 | 09 6d 6f 64 65 3d 48 61 |reak;...|.mode=Ha| |00001610| 73 44 65 70 74 68 28 64 | 65 76 69 63 65 2c 70 72 |sDepth(d|evice,pr| |00001620| 65 66 65 72 72 65 64 50 | 69 78 65 6c 53 69 7a 65 |eferredP|ixelSize| |00001630| 5b 69 5d 2c 30 2c 30 29 | 3b 0d 09 09 09 69 66 28 |[i],0,0)|;....if(| |00001640| 6d 6f 64 65 21 3d 30 29 | 7b 0d 09 09 09 09 70 72 |mode!=0)|{.....pr| |00001650| 69 6e 74 66 28 22 43 68 | 61 6e 67 69 6e 67 20 70 |intf("Ch|anging p| |00001660| 69 78 65 6c 53 69 7a 65 | 20 74 6f 20 25 64 20 62 |ixelSize| to %d b| |00001670| 69 74 73 2c 20 63 6f 6c | 6f 72 2e 5c 6e 22 2c 28 |its, col|or.\n",(| |00001680| 69 6e 74 29 70 72 65 66 | 65 72 72 65 64 50 69 78 |int)pref|erredPix| |00001690| 65 6c 53 69 7a 65 5b 69 | 5d 29 3b 0d 09 09 09 09 |elSize[i|]);.....| |000016a0| 65 72 72 6f 72 3d 53 65 | 74 44 65 70 74 68 28 64 |error=Se|tDepth(d| |000016b0| 65 76 69 63 65 2c 70 72 | 65 66 65 72 72 65 64 50 |evice,pr|eferredP| |000016c0| 69 78 65 6c 53 69 7a 65 | 5b 69 5d 2c 31 3c 3c 67 |ixelSize|[i],1<<g| |000016d0| 64 44 65 76 54 79 70 65 | 2c 31 29 3b 09 2f 2f 20 |dDevType|,1);.// | |000016e0| 63 6f 6c 6f 72 0d 09 09 | 09 09 62 72 65 61 6b 3b |color...|..break;| |000016f0| 0d 09 09 09 7d 0d 09 09 | 7d 0d 09 7d 0d 09 70 69 |....}...|}..}..pi| |00001700| 78 65 6c 53 69 7a 65 3d | 28 2a 2a 28 2a 2a 64 65 |xelSize=|(**(**de| |00001710| 76 69 63 65 29 2e 67 64 | 50 4d 61 70 29 2e 70 69 |vice).gd|PMap).pi| |00001720| 78 65 6c 53 69 7a 65 3b | 0d 0d 09 73 61 76 65 50 |xelSize;|...saveP| |00001730| 69 63 74 3d 43 68 6f 6f | 73 65 28 73 61 76 65 50 |ict=Choo|se(saveP| |00001740| 69 63 74 2c 22 53 61 76 | 65 20 67 72 61 74 69 6e |ict,"Sav|e gratin| |00001750| 67 20 74 6f 20 64 69 73 | 6b 20 61 73 20 61 20 50 |g to dis|k as a P| |00001760| 49 43 54 20 66 69 6c 65 | 3f 5c 6e 22 2c 6e 6f 59 |ICT file|?\n",noY| |00001770| 65 73 2c 32 29 3b 0d 09 | 73 61 76 65 45 50 53 3d |es,2);..|saveEPS=| |00001780| 43 68 6f 6f 73 65 28 73 | 61 76 65 45 50 53 2c 22 |Choose(s|aveEPS,"| |00001790| 53 61 76 65 20 67 72 61 | 74 69 6e 67 20 74 6f 20 |Save gra|ting to | |000017a0| 64 69 73 6b 20 61 73 20 | 61 6e 20 45 50 53 20 66 |disk as |an EPS f| |000017b0| 69 6c 65 3f 5c 6e 22 2c | 6e 6f 59 65 73 2c 32 29 |ile?\n",|noYes,2)| |000017c0| 3b 0d 09 0d 09 2f 2f 20 | 4c 6f 61 64 20 74 68 65 |;....// |Load the| |000017d0| 20 63 6c 75 74 20 77 69 | 74 68 20 61 20 67 72 61 | clut wi|th a gra| |000017e0| 79 73 63 61 6c 65 20 72 | 61 6d 70 2e 0d 09 47 44 |yscale r|amp...GD| |000017f0| 53 61 76 65 47 61 6d 6d | 61 28 64 65 76 69 63 65 |SaveGamm|a(device| |00001800| 29 3b 0d 09 47 44 55 6e | 63 6f 72 72 65 63 74 65 |);..GDUn|correcte| |00001810| 64 47 61 6d 6d 61 28 64 | 65 76 69 63 65 29 3b 09 |dGamma(d|evice);.| |00001820| 2f 2f 20 54 65 6c 6c 20 | 74 68 65 20 64 72 69 76 |// Tell |the driv| |00001830| 65 72 20 74 6f 20 66 61 | 69 74 68 66 75 6c 6c 79 |er to fa|ithfully| |00001840| 20 63 6f 70 79 20 6f 75 | 72 20 63 6f 6c 6f 72 73 | copy ou|r colors| |00001850| 20 69 6e 74 6f 20 0d 09 | 09 09 09 09 09 09 09 2f | into ..|......./| |00001860| 2f 20 74 68 65 20 63 6c | 75 74 20 77 69 74 68 6f |/ the cl|ut witho| |00001870| 75 74 20 61 6e 79 20 74 | 72 61 6e 73 66 6f 72 6d |ut any t|ransform| |00001880| 61 74 69 6f 6e 2e 0d 09 | 2f 2f 20 72 65 76 65 72 |ation...|// rever| |00001890| 73 65 20 74 61 62 6c 65 | 20 6d 61 74 63 68 65 73 |se table| matches| |000018a0| 20 73 74 61 6e 64 61 72 | 64 20 67 72 61 79 20 63 | standar|d gray c| |000018b0| 6f 6c 6f 72 20 74 61 62 | 6c 65 2c 20 77 68 69 63 |olor tab|le, whic| |000018c0| 68 20 77 65 27 6c 6c 20 | 75 73 65 20 66 6f 72 20 |h we'll |use for | |000018d0| 50 69 78 4d 61 70 54 6f | 50 49 43 54 28 29 2e 0d |PixMapTo|PICT()..| |000018e0| 09 63 6c 75 74 53 69 7a | 65 3d 47 44 43 6c 75 74 |.clutSiz|e=GDClut| |000018f0| 53 69 7a 65 28 64 65 76 | 69 63 65 29 3b 0d 09 66 |Size(dev|ice);..f| |00001900| 6f 72 28 69 3d 30 3b 69 | 3c 63 6c 75 74 53 69 7a |or(i=0;i|<clutSiz| |00001910| 65 3b 69 2b 2b 29 7b 0d | 09 09 74 61 62 6c 65 5b |e;i++){.|..table[| |00001920| 69 5d 2e 72 67 62 2e 72 | 65 64 3d 74 61 62 6c 65 |i].rgb.r|ed=table| |00001930| 5b 69 5d 2e 72 67 62 2e | 67 72 65 65 6e 3d 74 61 |[i].rgb.|green=ta| |00001940| 62 6c 65 5b 69 5d 2e 72 | 67 62 2e 62 6c 75 65 0d |ble[i].r|gb.blue.| |00001950| 09 09 09 3d 28 63 6c 75 | 74 53 69 7a 65 2d 31 2d |...=(clu|tSize-1-| |00001960| 69 29 2a 28 6c 6f 6e 67 | 29 30 78 66 66 66 66 2f |i)*(long|)0xffff/| |00001970| 28 63 6c 75 74 53 69 7a | 65 2d 31 29 3b 0d 09 7d |(clutSiz|e-1);..}| |00001980| 0d 09 65 72 72 6f 72 3d | 47 44 53 65 74 45 6e 74 |..error=|GDSetEnt| |00001990| 72 69 65 73 42 79 54 79 | 70 65 28 64 65 76 69 63 |riesByTy|pe(devic| |000019a0| 65 2c 30 2c 63 6c 75 74 | 53 69 7a 65 2d 31 2c 74 |e,0,clut|Size-1,t| |000019b0| 61 62 6c 65 29 3b 0d 0d | 09 2f 2f 20 4f 70 65 6e |able);..|.// Open| |000019c0| 20 77 69 6e 64 6f 77 20 | 61 6e 64 20 70 75 74 20 | window |and put | |000019d0| 67 72 61 74 69 6e 67 20 | 69 6e 20 69 74 2e 0d 09 |grating |in it...| |000019e0| 77 69 6e 64 6f 77 3d 47 | 44 4f 70 65 6e 57 69 6e |window=G|DOpenWin| |000019f0| 64 6f 77 31 28 64 65 76 | 69 63 65 29 3b 0d 09 53 |dow1(dev|ice);..S| |00001a00| 65 74 50 6f 72 74 28 77 | 69 6e 64 6f 77 29 3b 0d |etPort(w|indow);.| |00001a10| 09 50 6d 42 61 63 6b 43 | 6f 6c 6f 72 28 28 63 6c |.PmBackC|olor((cl| |00001a20| 75 74 53 69 7a 65 2d 31 | 29 2f 32 29 3b 09 2f 2f |utSize-1|)/2);.//| |00001a30| 20 54 68 69 73 20 77 6f | 72 6b 73 20 62 65 63 61 | This wo|rks beca| |00001a40| 75 73 65 20 47 44 4f 70 | 65 6e 57 69 6e 64 6f 77 |use GDOp|enWindow| |00001a50| 31 20 6d 61 72 6b 65 64 | 0d 09 45 72 61 73 65 52 |1 marked|..EraseR| |00001a60| 65 63 74 28 26 77 69 6e | 64 6f 77 2d 3e 70 6f 72 |ect(&win|dow->por| |00001a70| 74 52 65 63 74 29 3b 09 | 2f 2f 20 61 6c 6c 20 74 |tRect);.|// all t| |00001a80| 68 65 20 63 6f 6c 6f 72 | 73 20 61 73 20 70 6d 45 |he color|s as pmE| |00001a90| 78 70 6c 69 63 69 74 2e | 0d 09 53 65 74 52 65 63 |xplicit.|..SetRec| |00001aa0| 74 28 26 72 2c 30 2c 30 | 2c 53 49 5a 45 2c 53 49 |t(&r,0,0|,SIZE,SI| |00001ab0| 5a 45 29 3b 0d 09 43 65 | 6e 74 65 72 52 65 63 74 |ZE);..Ce|nterRect| |00001ac0| 49 6e 52 65 63 74 28 26 | 72 2c 26 77 69 6e 64 6f |InRect(&|r,&windo| |00001ad0| 77 2d 3e 70 6f 72 74 52 | 65 63 74 29 3b 0d 09 66 |w->portR|ect);..f| |00001ae0| 6f 72 28 69 3d 30 3b 69 | 3c 53 49 5a 45 3b 69 2b |or(i=0;i|<SIZE;i+| |00001af0| 2b 29 7b 0d 09 09 61 3d | 28 69 2d 53 49 5a 45 2f |+){...a=|(i-SIZE/| |00001b00| 32 29 2f 28 53 49 5a 45 | 2f 36 2e 29 3b 0d 09 09 |2)/(SIZE|/6.);...| |00001b10| 66 59 5b 69 5d 3d 65 78 | 70 28 2d 61 2a 61 29 3b |fY[i]=ex|p(-a*a);| |00001b20| 0d 09 09 66 58 5b 69 5d | 3d 66 59 5b 69 5d 2a 73 |...fX[i]|=fY[i]*s| |00001b30| 69 6e 28 28 69 2d 53 49 | 5a 45 2f 32 29 2a 28 32 |in((i-SI|ZE/2)*(2| |00001b40| 2e 30 2a 50 49 2f 38 30 | 2e 30 29 29 3b 0d 09 7d |.0*PI/80|.0));..}| |00001b50| 0d 09 2f 2a 0d 09 43 61 | 6c 6c 69 6e 67 20 53 68 |../*..Ca|lling Sh| |00001b60| 69 65 6c 64 43 75 72 73 | 6f 72 28 29 20 68 61 73 |ieldCurs|or() has| |00001b70| 20 74 77 6f 20 64 65 73 | 69 72 61 62 6c 65 20 65 | two des|irable e| |00001b80| 66 66 65 63 74 73 2c 20 | 6f 6e 65 20 64 69 72 65 |ffects, |one dire| |00001b90| 63 74 2c 20 6f 6e 65 20 | 69 6e 64 69 72 65 63 74 |ct, one |indirect| |00001ba0| 2e 0d 09 46 69 72 73 74 | 6c 79 2c 20 69 74 20 6b |...First|ly, it k| |00001bb0| 65 65 70 73 20 74 68 65 | 20 63 75 72 73 6f 72 20 |eeps the| cursor | |00001bc0| 66 72 6f 6d 20 6d 65 73 | 73 69 6e 67 20 75 70 20 |from mes|sing up | |00001bd0| 74 68 65 20 67 72 61 74 | 69 6e 67 20 74 68 61 74 |the grat|ing that| |00001be0| 20 77 65 27 72 65 20 64 | 72 61 77 69 6e 67 2e 0d | we're d|rawing..| |00001bf0| 09 53 65 63 6f 6e 64 6c | 79 2c 20 53 68 69 65 6c |.Secondl|y, Shiel| |00001c00| 64 43 75 72 73 6f 72 28 | 29 20 69 73 20 74 68 65 |dCursor(|) is the| |00001c10| 20 74 72 61 70 20 74 68 | 61 74 20 6e 6f 6e 2d 73 | trap th|at non-s| |00001c20| 74 61 6e 64 61 72 64 20 | 51 75 69 63 6b 44 72 61 |tandard |QuickDra| |00001c30| 77 20 64 65 76 69 63 65 | 73 20 70 61 74 63 68 20 |w device|s patch | |00001c40| 69 6e 20 6f 72 64 65 72 | 0d 09 74 6f 20 66 69 6e |in order|..to fin| |00001c50| 64 20 6f 75 74 20 77 68 | 61 74 20 70 61 72 74 73 |d out wh|at parts| |00001c60| 20 6f 66 20 74 68 65 20 | 73 63 72 65 65 6e 20 68 | of the |screen h| |00001c70| 61 76 65 20 62 65 65 6e | 20 75 70 64 61 74 65 64 |ave been| updated| |00001c80| 2e 20 54 68 75 73 20 74 | 68 65 20 63 61 6c 6c 20 |. Thus t|he call | |00001c90| 74 6f 20 53 68 69 65 6c | 64 43 75 72 73 6f 72 28 |to Shiel|dCursor(| |00001ca0| 29 0d 09 77 69 6c 6c 20 | 6d 61 6b 65 20 74 68 65 |)..will |make the| |00001cb0| 20 67 72 61 74 69 6e 67 | 20 73 68 6f 77 20 75 70 | grating| show up| |00001cc0| 20 6f 6e 20 61 20 52 61 | 64 69 75 73 20 50 6f 77 | on a Ra|dius Pow| |00001cd0| 65 72 56 69 65 77 2c 20 | 77 68 69 63 68 20 64 72 |erView, |which dr| |00001ce0| 69 76 65 73 20 61 20 76 | 69 64 65 6f 20 6d 6f 6e |ives a v|ideo mon| |00001cf0| 69 74 6f 72 20 76 69 61 | 0d 09 53 43 53 49 2c 20 |itor via|..SCSI, | |00001d00| 61 6e 64 20 6e 65 65 64 | 73 20 74 6f 20 6b 6e 6f |and need|s to kno| |00001d10| 77 20 77 68 65 6e 20 74 | 6f 20 63 6f 70 79 20 6e |w when t|o copy n| |00001d20| 65 77 20 69 6e 66 6f 20 | 66 72 6f 6d 20 74 68 65 |ew info |from the| |00001d30| 20 6d 65 6d 6f 72 79 20 | 62 75 66 66 65 72 20 74 | memory |buffer t| |00001d40| 6f 20 74 68 65 0d 09 73 | 63 72 65 65 6e 20 64 65 |o the..s|creen de| |00001d50| 76 69 63 65 2e 20 4d 79 | 20 75 6e 64 65 72 73 74 |vice. My| underst| |00001d60| 61 6e 64 69 6e 67 20 69 | 73 20 74 68 61 74 20 61 |anding i|s that a| |00001d70| 6c 6c 20 51 75 69 63 6b | 44 72 61 77 20 64 72 61 |ll Quick|Draw dra| |00001d80| 77 69 6e 67 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |wing ope|rations | |00001d90| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 0d 09 63 |automati|cally..c| |00001da0| 61 6c 6c 20 53 68 69 65 | 6c 64 43 75 72 73 6f 72 |all Shie|ldCursor| |00001db0| 28 29 20 26 20 53 68 6f | 77 43 75 72 73 6f 72 28 |() & Sho|wCursor(| |00001dc0| 29 2c 20 73 6f 20 74 68 | 69 73 20 69 73 20 6f 6e |), so th|is is on| |00001dd0| 6c 79 20 72 65 6c 65 76 | 61 6e 74 20 77 68 65 6e |ly relev|ant when| |00001de0| 20 77 65 20 64 72 61 77 | 20 62 79 70 61 73 73 69 | we draw| bypassi| |00001df0| 6e 67 0d 09 51 75 69 63 | 6b 44 72 61 77 2c 20 69 |ng..Quic|kDraw, i| |00001e00| 2e 65 2e 20 62 79 20 63 | 61 6c 6c 69 6e 67 20 53 |.e. by c|alling S| |00001e10| 65 74 50 69 78 65 6c 73 | 51 75 69 63 6b 6c 79 20 |etPixels|Quickly | |00001e20| 6f 72 20 43 6f 70 79 42 | 69 74 73 51 75 69 63 6b |or CopyB|itsQuick| |00001e30| 6c 79 2e 20 43 6f 70 79 | 57 69 6e 64 6f 77 73 28 |ly. Copy|Windows(| |00001e40| 29 20 63 61 6c 6c 73 0d | 09 53 68 69 65 6c 64 43 |) calls.|.ShieldC| |00001e50| 75 72 73 6f 72 20 61 6e | 64 20 53 68 6f 77 43 75 |ursor an|d ShowCu| |00001e60| 72 73 6f 72 20 66 6f 72 | 20 79 6f 75 2e 0d 09 2a |rsor for| you...*| |00001e70| 2f 0d 09 70 74 2e 68 3d | 70 74 2e 76 3d 30 3b 0d |/..pt.h=|pt.v=0;.| |00001e80| 09 4c 6f 63 61 6c 54 6f | 47 6c 6f 62 61 6c 28 26 |.LocalTo|Global(&| |00001e90| 70 74 29 3b 0d 09 53 68 | 69 65 6c 64 43 75 72 73 |pt);..Sh|ieldCurs| |00001ea0| 6f 72 28 26 72 2c 70 74 | 29 3b 0d 09 66 6f 72 28 |or(&r,pt|);..for(| |00001eb0| 6a 3d 30 3b 6a 3c 53 49 | 5a 45 3b 6a 2b 2b 29 7b |j=0;j<SI|ZE;j++){| |00001ec0| 0d 09 09 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |...unsig|ned long| |00001ed0| 20 72 6f 77 5b 53 49 5a | 45 5d 3b 0d 09 09 66 6f | row[SIZ|E];...fo| |00001ee0| 72 28 69 3d 30 3b 69 3c | 53 49 5a 45 3b 69 2b 2b |r(i=0;i<|SIZE;i++| |00001ef0| 29 20 72 6f 77 5b 69 5d | 3d 28 63 6c 75 74 53 69 |) row[i]|=(clutSi| |00001f00| 7a 65 2d 31 29 2a 30 2e | 35 2a 28 31 2e 30 2b 66 |ze-1)*0.|5*(1.0+f| |00001f10| 59 5b 6a 5d 2a 66 58 5b | 69 5d 29 3b 0d 09 09 69 |Y[j]*fX[|i]);...i| |00001f20| 66 28 70 69 78 65 6c 53 | 69 7a 65 3d 3d 31 36 29 |f(pixelS|ize==16)| |00001f30| 66 6f 72 28 69 3d 30 3b | 69 3c 53 49 5a 45 3b 69 |for(i=0;|i<SIZE;i| |00001f40| 2b 2b 29 20 72 6f 77 5b | 69 5d 2a 3d 31 2b 28 31 |++) row[|i]*=1+(1| |00001f50| 3c 3c 35 29 2b 28 31 3c | 3c 31 30 29 3b 0d 09 09 |<<5)+(1<|<10);...| |00001f60| 69 66 28 70 69 78 65 6c | 53 69 7a 65 3d 3d 33 32 |if(pixel|Size==32| |00001f70| 29 66 6f 72 28 69 3d 30 | 3b 69 3c 53 49 5a 45 3b |)for(i=0|;i<SIZE;| |00001f80| 69 2b 2b 29 20 72 6f 77 | 5b 69 5d 2a 3d 31 2b 28 |i++) row|[i]*=1+(| |00001f90| 31 3c 3c 38 29 2b 28 31 | 55 4c 3c 3c 31 36 29 3b |1<<8)+(1|UL<<16);| |00001fa0| 0d 09 09 53 65 74 50 69 | 78 65 6c 73 51 75 69 63 |...SetPi|xelsQuic| |00001fb0| 6b 6c 79 28 72 2e 6c 65 | 66 74 2c 72 2e 74 6f 70 |kly(r.le|ft,r.top| |00001fc0| 2b 6a 2c 72 6f 77 2c 53 | 49 5a 45 29 3b 0d 09 7d |+j,row,S|IZE);..}| |00001fd0| 0d 09 69 66 28 73 61 76 | 65 50 69 63 74 29 7b 0d |..if(sav|ePict){.| |00001fe0| 09 09 70 69 78 65 6c 53 | 69 7a 65 3d 38 3b 0d 09 |..pixelS|ize=8;..| |00001ff0| 09 63 74 3d 47 65 74 43 | 54 61 62 6c 65 28 70 69 |.ct=GetC|Table(pi| |00002000| 78 65 6c 53 69 7a 65 2b | 33 32 29 3b 09 2f 2f 20 |xelSize+|32);.// | |00002010| 67 72 61 79 20 72 61 6d | 70 0d 09 09 50 69 78 4d |gray ram|p...PixM| |00002020| 61 70 54 6f 50 49 43 54 | 28 22 67 72 61 74 69 6e |apToPICT|("gratin| |00002030| 67 2e 70 69 63 74 22 2c | 28 28 43 57 69 6e 64 6f |g.pict",|((CWindo| |00002040| 77 50 74 72 29 77 69 6e | 64 6f 77 29 2d 3e 70 6f |wPtr)win|dow)->po| |00002050| 72 74 50 69 78 4d 61 70 | 0d 09 09 09 2c 26 72 2c |rtPixMap|....,&r,| |00002060| 70 69 78 65 6c 53 69 7a | 65 2c 63 74 29 3b 0d 09 |pixelSiz|e,ct);..| |00002070| 09 70 72 69 6e 74 66 28 | 22 49 6d 61 67 65 20 77 |.printf(|"Image w| |00002080| 61 73 20 73 61 76 65 64 | 20 74 6f 20 64 69 73 6b |as saved| to disk| |00002090| 20 61 73 20 66 69 6c 65 | 20 d2 67 72 61 74 69 6e | as file| .gratin| |000020a0| 67 2e 70 69 63 74 d3 2e | 5c 6e 22 29 3b 0d 09 7d |g.pict..|\n");..}| |000020b0| 0d 09 69 66 28 73 61 76 | 65 45 50 53 29 7b 0d 09 |..if(sav|eEPS){..| |000020c0| 09 52 65 63 74 20 70 61 | 67 65 52 65 63 74 3b 0d |.Rect pa|geRect;.| |000020d0| 09 09 53 65 74 52 65 63 | 74 28 26 70 61 67 65 52 |..SetRec|t(&pageR| |000020e0| 65 63 74 2c 38 2e 35 2f | 32 2e 30 2a 37 32 2d 28 |ect,8.5/|2.0*72-(| |000020f0| 28 72 2e 72 69 67 68 74 | 2d 72 2e 6c 65 66 74 29 |(r.right|-r.left)| |00002100| 2f 32 29 0d 09 09 09 2c | 37 2e 30 2a 37 32 2b 28 |/2)....,|7.0*72+(| |00002110| 72 2e 62 6f 74 74 6f 6d | 2d 72 2e 74 6f 70 29 0d |r.bottom|-r.top).| |00002120| 09 09 09 2c 38 2e 35 2f | 32 2a 37 32 2b 28 28 72 |...,8.5/|2*72+((r| |00002130| 2e 72 69 67 68 74 2d 72 | 2e 6c 65 66 74 29 2f 32 |.right-r|.left)/2| |00002140| 29 2c 37 2e 30 2a 37 32 | 29 3b 0d 09 09 57 69 6e |),7.0*72|);...Win| |00002150| 64 6f 77 54 6f 45 50 53 | 28 28 43 57 69 6e 64 6f |dowToEPS|((CWindo| |00002160| 77 50 74 72 29 77 69 6e | 64 6f 77 2c 22 67 72 61 |wPtr)win|dow,"gra| |00002170| 74 69 6e 67 2e 65 70 73 | 22 2c 26 72 2c 26 70 61 |ting.eps|",&r,&pa| |00002180| 67 65 52 65 63 74 2c 30 | 2c 30 2c 4e 55 4c 4c 29 |geRect,0|,0,NULL)| |00002190| 3b 0d 09 09 70 72 69 6e | 74 66 28 22 49 6d 61 67 |;...prin|tf("Imag| |000021a0| 65 20 77 61 73 20 73 61 | 76 65 64 20 74 6f 20 64 |e was sa|ved to d| |000021b0| 69 73 6b 20 61 73 20 66 | 69 6c 65 20 d2 67 72 61 |isk as f|ile .gra| |000021c0| 74 69 6e 67 2e 65 70 73 | 2e 5c 6e 22 29 3b 0d 09 |ting.eps|.\n");..| |000021d0| 7d 0d 09 53 68 6f 77 43 | 75 72 73 6f 72 28 29 3b |}..ShowC|ursor();| |000021e0| 0d 09 53 65 74 50 6f 72 | 74 28 28 57 69 6e 64 6f |..SetPor|t((Windo| |000021f0| 77 50 74 72 29 6f 6c 64 | 50 6f 72 74 29 3b 0d 09 |wPtr)old|Port);..| |00002200| 70 72 69 6e 74 66 28 22 | 44 6f 6e 65 2e 20 48 69 |printf("|Done. Hi| |00002210| 74 20 72 65 74 75 72 6e | 20 74 6f 20 71 75 69 74 |t return| to quit| |00002220| 2e 5c 6e 22 29 3b 0d 09 | 67 65 74 73 28 73 74 72 |.\n");..|gets(str| |00002230| 69 6e 67 29 3b 0d 09 47 | 44 44 69 73 70 6f 73 65 |ing);..G|DDispose| |00002240| 57 69 6e 64 6f 77 31 28 | 77 69 6e 64 6f 77 29 3b |Window1(|window);| |00002250| 0d 09 2f 2f 20 72 65 73 | 74 6f 72 65 0d 09 47 44 |..// res|tore..GD| |00002260| 52 65 73 74 6f 72 65 47 | 61 6d 6d 61 28 64 65 76 |RestoreG|amma(dev| |00002270| 69 63 65 29 3b 0d 09 47 | 44 52 65 73 74 6f 72 65 |ice);..G|DRestore| |00002280| 44 65 76 69 63 65 43 6c | 75 74 28 64 65 76 69 63 |DeviceCl|ut(devic| |00002290| 65 29 3b 0d 09 65 72 72 | 6f 72 3d 53 65 74 44 65 |e);..err|or=SetDe| |000022a0| 70 74 68 28 64 65 76 69 | 63 65 2c 6f 6c 64 50 69 |pth(devi|ce,oldPi| |000022b0| 78 65 6c 53 69 7a 65 2c | 31 3c 3c 67 64 44 65 76 |xelSize,|1<<gdDev| |000022c0| 54 79 70 65 2c 6f 6c 64 | 49 73 43 6f 6c 6f 72 29 |Type,old|IsColor)| |000022d0| 3b 0d 09 23 69 66 20 28 | 54 48 49 4e 4b 5f 43 20 |;..#if (|THINK_C | |000022e0| 7c 7c 20 54 48 49 4e 4b | 5f 43 50 4c 55 53 20 7c ||| THINK|_CPLUS || |000022f0| 7c 20 53 59 4d 41 4e 54 | 45 43 5f 43 29 0d 09 09 || SYMANT|EC_C)...| |00002300| 61 62 6f 72 74 28 29 3b | 0d 09 23 65 6c 69 66 20 |abort();|..#elif | |00002310| 5f 5f 4d 57 45 52 4b 53 | 5f 5f 0d 09 09 53 49 4f |__MWERKS|__...SIO| |00002320| 55 58 53 65 74 74 69 6e | 67 73 2e 61 75 74 6f 63 |UXSettin|gs.autoc| |00002330| 6c 6f 73 65 6f 6e 71 75 | 69 74 3d 31 3b 0d 09 23 |loseonqu|it=1;..#| |00002340| 65 6e 64 69 66 0d 7d 0d | 00 00 00 00 00 00 00 00 |endif.}.|........| |00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002380| 00 00 01 00 00 00 01 86 | 00 00 00 86 00 00 00 66 |........|.......f| |00002390| 00 00 00 02 05 54 72 61 | 73 68 00 00 00 00 00 00 |.....Tra|sh......| |000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000023b0| 09 47 72 61 74 69 6e 67 | 2e 63 02 00 00 00 54 45 |.Grating|.c....TE| |000023c0| 58 54 43 57 49 45 01 00 | 00 dc 00 00 00 00 00 00 |XTCWIE..|........| |000023d0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 dc 00 00 |..TEXTCW|IE......| |000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000023f0| 00 00 a7 9b 31 8b 00 00 | 22 c8 00 00 01 ec 20 4c |....1...|"..... L| |00002400| 6f 67 5d 00 00 00 00 00 | 00 00 00 73 25 00 00 00 |og].....|...s%...| |00002410| 00 02 1a 5b 44 69 73 6b | 45 78 70 72 65 73 73 20 |...[Disk|Express | |00002420| 41 63 74 69 76 69 74 79 | 20 4c 6f 67 5d 00 00 00 |Activity| Log]...| |00002430| 00 00 00 00 00 73 25 00 | 00 00 00 02 1a 5b 44 69 |.....s%.|.....[Di| |00002440| 73 6b 45 78 70 72 65 73 | 73 20 41 63 74 69 76 69 |skExpres|s Activi| |00002450| 74 79 20 4c 6f 67 5d 00 | 00 00 00 00 00 00 00 73 |ty Log].|.......s| |00002460| 25 00 00 00 00 02 1a 5b | 44 69 73 6b 45 78 70 72 |%......[|DiskExpr| |00002470| 65 73 73 20 41 63 74 69 | 76 69 74 79 20 4c 6f 67 |ess Acti|vity Log| |00002480| 00 00 00 0a 00 00 18 74 | 00 a4 00 00 00 00 00 00 |.......t|........| |00002490| 00 20 00 02 00 00 0d f8 | 00 00 0d fc 05 6d 61 69 |. ......|.....mai| |000024a0| 6e 00 00 00 0e 32 00 00 | 0e 39 07 47 72 61 74 69 |n....2..|.9.Grati| |000024b0| 6e 67 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |ng...H..|Monaco..| |000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000024d0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 57 00 09 |........|.....W..| |000024e0| 01 d7 02 68 00 57 00 09 | 01 d7 02 68 ad 61 38 b7 |...h.W..|...h.a8.| |000024f0| 00 00 19 0b 00 00 19 14 | 00 00 16 7d 00 00 00 00 |........|...}....| |00002500| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 86 00 00 |........|........| |00002510| 00 86 00 00 00 66 01 ba | 93 40 29 22 00 00 00 1c |.....f..|.@)"....| |00002520| 00 66 00 02 42 4b 50 54 | 00 00 00 1a 4d 50 53 52 |.f..BKPT|....MPSR| |00002530| 00 01 00 26 4d 57 42 42 | 00 00 00 3e 52 a0 ff ff |...&MWBB|...>R...| |00002540| 00 00 00 00 00 00 00 00 | 03 ef ff ff 00 00 00 0e |........|........| |00002550| 00 00 00 00 03 ed ff ff | 00 00 00 32 00 00 00 00 |........|...2....| |00002560| 03 f0 ff ff 00 00 00 7e | 00 00 00 00 00 00 00 00 |.......~|........| |00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+