home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / Videotoolbox 96-08-22-c.sit / VideoToolbox / VideoToolboxSources / ShowAndSaveGWorld.c < prev    next >
MacBinary  |  1995-07-20  |  4.0 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: ShowAndSaveGWorld.c

ConfidenceProgramDetectionMatch TypeSupport
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 20 09:18:19 1995, modified Thu Jul 20 09:18:19 1995, creator 'CWIE', type ASCII, 3453 bytes "ShowAndSaveGWorld.c" , at 0xdfd 410 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
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 53 68 6f 77 41 6e | 64 53 61 76 65 47 57 6f |..ShowAn|dSaveGWo|
|00000010| 72 6c 64 2e 63 00 00 00 | 00 00 00 00 00 00 00 00 |rld.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 0d 7d 00 | 00 01 9a ac 34 08 1b ac |......}.|....4...|
|00000060| 34 08 1b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |4.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 79 ff 00 00 |........|....y...|
|00000080| 2f 2a 0d 53 68 6f 77 41 | 6e 64 53 61 76 65 47 57 |/*.ShowA|ndSaveGW|
|00000090| 6f 72 6c 64 2e 63 0d 0d | 54 68 69 73 20 73 68 6f |orld.c..|This sho|
|000000a0| 77 73 20 61 20 47 57 6f | 72 6c 64 20 69 6d 61 67 |ws a GWo|rld imag|
|000000b0| 65 20 6f 6e 20 74 68 65 | 20 73 65 6c 65 63 74 65 |e on the| selecte|
|000000c0| 64 20 64 65 76 69 63 65 | 20 61 6e 64 20 73 61 76 |d device| and sav|
|000000d0| 65 73 20 69 74 20 74 6f | 20 64 69 73 6b 20 61 73 |es it to| disk as|
|000000e0| 20 61 20 50 49 43 54 20 | 6f 72 20 65 70 73 20 66 | a PICT |or eps f|
|000000f0| 69 6c 65 2e 0d 49 20 66 | 69 6e 64 20 69 74 20 75 |ile..I f|ind it u|
|00000100| 73 65 66 75 6c 20 77 68 | 65 6e 20 70 72 65 70 61 |seful wh|en prepa|
|00000110| 72 69 6e 67 20 69 6d 61 | 67 65 73 20 66 6f 72 20 |ring ima|ges for |
|00000120| 64 65 6d 6f 73 2c 20 65 | 74 63 2e 0d 0d 54 68 65 |demos, e|tc...The|
|00000130| 20 69 6d 61 67 65 20 69 | 73 20 64 69 73 70 6c 61 | image i|s displa|
|00000140| 79 65 64 20 6f 6e 2d 73 | 63 72 65 65 6e 20 69 6e |yed on-s|creen in|
|00000150| 20 74 68 65 20 73 75 70 | 70 6c 69 65 64 20 73 69 | the sup|plied si|
|00000160| 7a 65 2e 20 48 6f 77 65 | 76 65 72 2c 20 62 65 66 |ze. Howe|ver, bef|
|00000170| 6f 72 65 20 73 61 76 69 | 6e 67 20 74 6f 0d 64 69 |ore savi|ng to.di|
|00000180| 73 6b 20 69 74 20 69 73 | 20 65 78 70 61 6e 64 65 |sk it is| expande|
|00000190| 64 20 62 79 20 74 68 65 | 20 22 65 78 70 61 6e 64 |d by the| "expand|
|000001a0| 22 20 66 61 63 74 6f 72 | 2e 0d 0d 48 65 72 65 20 |" factor|...Here |
|000001b0| 61 72 65 20 74 68 65 20 | 62 61 72 65 20 62 6f 6e |are the |bare bon|
|000001c0| 65 73 20 6f 66 20 61 20 | 70 72 6f 67 72 61 6d 20 |es of a |program |
|000001d0| 74 6f 20 75 73 65 20 53 | 68 6f 77 41 6e 64 53 61 |to use S|howAndSa|
|000001e0| 76 65 47 57 6f 72 6c 64 | 3a 0d 0d 09 69 6e 74 20 |veGWorld|:...int |
|000001f0| 73 63 72 65 65 6e 3d 31 | 2c 73 61 76 65 50 49 43 |screen=1|,savePIC|
|00000200| 54 3d 30 2c 73 61 76 65 | 45 50 53 3d 31 3b 0d 09 |T=0,save|EPS=1;..|
|00000210| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 3b |GDHandle| device;|
|00000220| 0d 09 64 6f 75 62 6c 65 | 20 65 78 70 61 6e 64 3d |..double| expand=|
|00000230| 32 3b 0d 0d 09 73 63 72 | 65 65 6e 3d 43 68 6f 6f |2;...scr|een=Choo|
|00000240| 73 65 53 63 72 65 65 6e | 28 73 63 72 65 65 6e 2c |seScreen|(screen,|
|00000250| 22 57 68 69 63 68 20 73 | 63 72 65 65 6e 3f 22 29 |"Which s|creen?")|
|00000260| 3b 0d 09 64 65 76 69 63 | 65 3d 47 65 74 53 63 72 |;..devic|e=GetScr|
|00000270| 65 65 6e 44 65 76 69 63 | 65 28 73 63 72 65 65 6e |eenDevic|e(screen|
|00000280| 29 3b 0d 09 73 61 76 65 | 50 69 63 74 3d 43 68 6f |);..save|Pict=Cho|
|00000290| 6f 73 65 28 73 61 76 65 | 50 69 63 74 2c 22 53 61 |ose(save|Pict,"Sa|
|000002a0| 76 65 20 69 6d 61 67 65 | 20 74 6f 20 64 69 73 6b |ve image| to disk|
|000002b0| 20 61 73 20 61 20 50 49 | 43 54 20 66 69 6c 65 3f | as a PI|CT file?|
|000002c0| 5c 6e 22 2c 6e 6f 59 65 | 73 2c 32 29 3b 0d 09 73 |\n",noYe|s,2);..s|
|000002d0| 61 76 65 45 50 53 3d 43 | 68 6f 6f 73 65 28 73 61 |aveEPS=C|hoose(sa|
|000002e0| 76 65 45 50 53 2c 22 53 | 61 76 65 20 69 6d 61 67 |veEPS,"S|ave imag|
|000002f0| 65 20 74 6f 20 64 69 73 | 6b 20 61 73 20 61 6e 20 |e to dis|k as an |
|00000300| 45 50 53 20 66 69 6c 65 | 3f 5c 6e 22 2c 6e 6f 59 |EPS file|?\n",noY|
|00000310| 65 73 2c 32 29 3b 0d 09 | 2f 2f 20 61 64 64 20 63 |es,2);..|// add c|
|00000320| 6f 64 65 20 68 65 72 65 | 20 74 6f 20 63 72 65 61 |ode here| to crea|
|00000330| 74 65 20 79 6f 75 72 20 | 47 57 6f 72 6c 64 20 61 |te your |GWorld a|
|00000340| 6e 64 20 70 75 74 20 61 | 6e 20 69 6e 74 65 72 65 |nd put a|n intere|
|00000350| 73 74 69 6e 67 20 69 6d | 61 67 65 20 69 6e 20 69 |sting im|age in i|
|00000360| 74 2e 0d 09 53 68 6f 77 | 41 6e 64 53 61 76 65 47 |t...Show|AndSaveG|
|00000370| 57 6f 72 6c 64 28 77 6f | 72 6c 64 2c 64 65 76 69 |World(wo|rld,devi|
|00000380| 63 65 2c 65 78 70 61 6e | 64 2c 22 69 6e 74 65 72 |ce,expan|d,"inter|
|00000390| 65 73 74 69 6e 67 22 2c | 73 61 76 65 50 69 63 74 |esting",|savePict|
|000003a0| 2c 73 61 76 65 45 50 53 | 29 3b 0d 09 44 69 73 70 |,saveEPS|);..Disp|
|000003b0| 6f 73 65 47 57 6f 72 6c | 64 28 77 6f 72 6c 64 29 |oseGWorl|d(world)|
|000003c0| 3b 0d 0d 48 49 53 54 4f | 52 59 3a 0d 33 2f 32 30 |;..HISTO|RY:.3/20|
|000003d0| 2f 39 35 20 64 67 70 20 | 77 72 6f 74 65 20 69 74 |/95 dgp |wrote it|
|000003e0| 20 74 6f 20 70 72 6f 64 | 75 63 65 20 69 6c 6c 75 | to prod|uce illu|
|000003f0| 73 74 72 61 74 69 6f 6e | 73 20 66 6f 72 20 44 69 |stration|s for Di|
|00000400| 73 63 6f 76 65 72 20 4d | 61 67 61 7a 69 6e 65 2e |scover M|agazine.|
|00000410| 0d 36 2f 33 30 2f 39 35 | 20 64 67 70 20 61 64 64 |.6/30/95| dgp add|
|00000420| 65 64 20 74 6f 20 74 68 | 65 20 56 69 64 65 6f 54 |ed to th|e VideoT|
|00000430| 6f 6f 6c 62 6f 78 2c 20 | 77 68 69 6c 65 20 49 20 |oolbox, |while I |
|00000440| 77 61 73 20 70 72 65 70 | 61 72 69 6e 67 20 64 65 |was prep|aring de|
|00000450| 6d 6f 73 20 66 6f 72 20 | 6d 79 20 4e 49 48 20 61 |mos for |my NIH a|
|00000460| 70 70 6c 69 63 61 74 69 | 6f 6e 2e 0d 2a 2f 0d 23 |pplicati|on..*/.#|
|00000470| 69 6e 63 6c 75 64 65 20 | 22 56 69 64 65 6f 54 6f |include |"VideoTo|
|00000480| 6f 6c 62 6f 78 2e 68 22 | 0d 76 6f 69 64 20 53 68 |olbox.h"|.void Sh|
|00000490| 6f 77 41 6e 64 53 61 76 | 65 47 57 6f 72 6c 64 28 |owAndSav|eGWorld(|
|000004a0| 47 57 6f 72 6c 64 50 74 | 72 20 73 6d 61 6c 6c 57 |GWorldPt|r smallW|
|000004b0| 6f 72 6c 64 2c 47 44 48 | 61 6e 64 6c 65 20 64 65 |orld,GDH|andle de|
|000004c0| 76 69 63 65 2c 64 6f 75 | 62 6c 65 20 65 78 70 61 |vice,dou|ble expa|
|000004d0| 6e 64 0d 09 2c 63 68 61 | 72 20 2a 66 69 6c 65 6e |nd..,cha|r *filen|
|000004e0| 61 6d 65 2c 42 6f 6f 6c | 65 61 6e 20 73 61 76 65 |ame,Bool|ean save|
|000004f0| 50 69 63 74 2c 42 6f 6f | 6c 65 61 6e 20 73 61 76 |Pict,Boo|lean sav|
|00000500| 65 45 50 53 29 3b 0d 0d | 76 6f 69 64 20 53 68 6f |eEPS);..|void Sho|
|00000510| 77 41 6e 64 53 61 76 65 | 47 57 6f 72 6c 64 28 47 |wAndSave|GWorld(G|
|00000520| 57 6f 72 6c 64 50 74 72 | 20 73 6d 61 6c 6c 57 6f |WorldPtr| smallWo|
|00000530| 72 6c 64 2c 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |rld,GDHa|ndle dev|
|00000540| 69 63 65 2c 64 6f 75 62 | 6c 65 20 65 78 70 61 6e |ice,doub|le expan|
|00000550| 64 0d 09 2c 63 68 61 72 | 20 2a 66 69 6c 65 6e 61 |d..,char| *filena|
|00000560| 6d 65 2c 42 6f 6f 6c 65 | 61 6e 20 73 61 76 65 50 |me,Boole|an saveP|
|00000570| 69 63 74 2c 42 6f 6f 6c | 65 61 6e 20 73 61 76 65 |ict,Bool|ean save|
|00000580| 45 50 53 29 0d 7b 0d 09 | 63 68 61 72 20 73 74 72 |EPS).{..|char str|
|00000590| 69 6e 67 5b 31 30 30 5d | 3b 0d 09 52 65 63 74 20 |ing[100]|;..Rect |
|000005a0| 70 61 67 65 52 65 63 74 | 2c 70 61 70 65 72 52 65 |pageRect|,paperRe|
|000005b0| 63 74 2c 72 3b 0d 09 6c | 6f 6e 67 20 63 6f 70 79 |ct,r;..l|ong copy|
|000005c0| 4d 6f 64 65 3b 0d 09 57 | 69 6e 64 6f 77 50 74 72 |Mode;..W|indowPtr|
|000005d0| 20 77 69 6e 64 6f 77 2c | 6f 6c 64 50 6f 72 74 3b | window,|oldPort;|
|000005e0| 0d 09 43 6f 6c 6f 72 54 | 61 62 6c 65 20 2a 2a 63 |..ColorT|able **c|
|000005f0| 74 3b 0d 09 69 6e 74 20 | 65 72 72 6f 72 3b 0d 0d |t;..int |error;..|
|00000600| 09 2f 2f 20 73 68 6f 77 | 20 69 74 0d 09 61 73 73 |.// show| it..ass|
|00000610| 65 72 74 28 64 65 76 69 | 63 65 21 3d 4e 55 4c 4c |ert(devi|ce!=NULL|
|00000620| 29 3b 0d 09 61 73 73 65 | 72 74 28 73 6d 61 6c 6c |);..asse|rt(small|
|00000630| 57 6f 72 6c 64 21 3d 4e | 55 4c 4c 29 3b 0d 09 61 |World!=N|ULL);..a|
|00000640| 73 73 65 72 74 28 49 73 | 47 57 6f 72 6c 64 50 74 |ssert(Is|GWorldPt|
|00000650| 72 28 73 6d 61 6c 6c 57 | 6f 72 6c 64 29 29 3b 0d |r(smallW|orld));.|
|00000660| 09 63 74 3d 28 2a 2a 47 | 65 74 47 57 6f 72 6c 64 |.ct=(**G|etGWorld|
|00000670| 50 69 78 4d 61 70 28 73 | 6d 61 6c 6c 57 6f 72 6c |PixMap(s|mallWorl|
|00000680| 64 29 29 2e 70 6d 54 61 | 62 6c 65 3b 0d 09 61 73 |d)).pmTa|ble;..as|
|00000690| 73 65 72 74 28 63 74 21 | 3d 4e 55 4c 4c 29 3b 0d |sert(ct!|=NULL);.|
|000006a0| 09 65 72 72 6f 72 3d 47 | 44 53 65 74 45 6e 74 72 |.error=G|DSetEntr|
|000006b0| 69 65 73 42 79 54 79 70 | 65 28 64 65 76 69 63 65 |iesByTyp|e(device|
|000006c0| 2c 30 2c 28 2a 2a 63 74 | 29 2e 63 74 53 69 7a 65 |,0,(**ct|).ctSize|
|000006d0| 2c 28 2a 2a 63 74 29 2e | 63 74 54 61 62 6c 65 29 |,(**ct).|ctTable)|
|000006e0| 3b 0d 09 77 69 6e 64 6f | 77 3d 47 44 4f 70 65 6e |;..windo|w=GDOpen|
|000006f0| 57 69 6e 64 6f 77 31 28 | 64 65 76 69 63 65 29 3b |Window1(|device);|
|00000700| 0d 09 61 73 73 65 72 74 | 28 77 69 6e 64 6f 77 21 |..assert|(window!|
|00000710| 3d 4e 55 4c 4c 29 3b 0d | 09 72 3d 73 6d 61 6c 6c |=NULL);.|.r=small|
|00000720| 57 6f 72 6c 64 2d 3e 70 | 6f 72 74 52 65 63 74 3b |World->p|ortRect;|
|00000730| 0d 09 4f 66 66 73 65 74 | 52 65 63 74 28 26 72 2c |..Offset|Rect(&r,|
|00000740| 2d 72 2e 6c 65 66 74 2c | 2d 72 2e 74 6f 70 29 3b |-r.left,|-r.top);|
|00000750| 0d 09 53 65 63 74 52 65 | 63 74 28 26 72 2c 26 77 |..SectRe|ct(&r,&w|
|00000760| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 2c |indow->p|ortRect,|
|00000770| 26 72 29 3b 0d 09 53 69 | 7a 65 57 69 6e 64 6f 77 |&r);..Si|zeWindow|
|00000780| 28 77 69 6e 64 6f 77 2c | 72 2e 72 69 67 68 74 2c |(window,|r.right,|
|00000790| 72 2e 62 6f 74 74 6f 6d | 2c 30 29 3b 0d 09 47 65 |r.bottom|,0);..Ge|
|000007a0| 74 50 6f 72 74 28 26 6f | 6c 64 50 6f 72 74 29 3b |tPort(&o|ldPort);|
|000007b0| 0d 09 53 65 74 50 6f 72 | 74 28 77 69 6e 64 6f 77 |..SetPor|t(window|
|000007c0| 29 3b 0d 09 45 72 61 73 | 65 52 65 63 74 28 26 77 |);..Eras|eRect(&w|
|000007d0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 29 |indow->p|ortRect)|
|000007e0| 3b 0d 09 53 65 74 50 6f | 72 74 28 6f 6c 64 50 6f |;..SetPo|rt(oldPo|
|000007f0| 72 74 29 3b 0d 09 69 66 | 28 47 44 50 69 78 65 6c |rt);..if|(GDPixel|
|00000800| 53 69 7a 65 28 64 65 76 | 69 63 65 29 3d 3d 47 44 |Size(dev|ice)==GD|
|00000810| 50 69 78 65 6c 53 69 7a | 65 28 47 65 74 47 57 6f |PixelSiz|e(GetGWo|
|00000820| 72 6c 64 44 65 76 69 63 | 65 28 73 6d 61 6c 6c 57 |rldDevic|e(smallW|
|00000830| 6f 72 6c 64 29 29 29 63 | 6f 70 79 4d 6f 64 65 3d |orld)))c|opyMode=|
|00000840| 73 72 63 43 6f 70 79 4c | 69 74 65 72 61 6c 6c 79 |srcCopyL|iterally|
|00000850| 3b 0d 09 65 6c 73 65 20 | 63 6f 70 79 4d 6f 64 65 |;..else |copyMode|
|00000860| 3d 73 72 63 43 6f 70 79 | 3b 0d 09 72 3d 73 6d 61 |=srcCopy|;..r=sma|
|00000870| 6c 6c 57 6f 72 6c 64 2d | 3e 70 6f 72 74 52 65 63 |llWorld-|>portRec|
|00000880| 74 3b 0d 09 43 65 6e 74 | 65 72 52 65 63 74 49 6e |t;..Cent|erRectIn|
|00000890| 52 65 63 74 28 26 72 2c | 26 77 69 6e 64 6f 77 2d |Rect(&r,|&window-|
|000008a0| 3e 70 6f 72 74 52 65 63 | 74 29 3b 0d 09 65 72 72 |>portRec|t);..err|
|000008b0| 6f 72 3d 43 6f 70 79 57 | 69 6e 64 6f 77 73 28 73 |or=CopyW|indows(s|
|000008c0| 6d 61 6c 6c 57 6f 72 6c | 64 2c 28 43 57 69 6e 64 |mallWorl|d,(CWind|
|000008d0| 6f 77 50 74 72 29 77 69 | 6e 64 6f 77 0d 09 09 2c |owPtr)wi|ndow...,|
|000008e0| 26 73 6d 61 6c 6c 57 6f | 72 6c 64 2d 3e 70 6f 72 |&smallWo|rld->por|
|000008f0| 74 52 65 63 74 2c 26 72 | 2c 63 6f 70 79 4d 6f 64 |tRect,&r|,copyMod|
|00000900| 65 2c 4e 55 4c 4c 29 3b | 0d 09 69 66 28 65 72 72 |e,NULL);|..if(err|
|00000910| 6f 72 29 50 72 69 6e 74 | 66 45 78 69 74 28 22 25 |or)Print|fExit("%|
|00000920| 73 20 6c 69 6e 65 20 25 | 64 3a 20 43 6f 70 79 57 |s line %|d: CopyW|
|00000930| 69 6e 64 6f 77 73 20 65 | 72 72 6f 72 20 25 64 5c |indows e|rror %d\|
|00000940| 6e 22 2c 5f 5f 46 49 4c | 45 5f 5f 2c 5f 5f 4c 49 |n",__FIL|E__,__LI|
|00000950| 4e 45 5f 5f 2c 65 72 72 | 6f 72 29 3b 0d 0d 09 69 |NE__,err|or);...i|
|00000960| 66 28 30 29 7b 0d 09 09 | 2f 2f 20 73 68 6f 77 20 |f(0){...|// show |
|00000970| 69 74 2c 20 62 69 67 67 | 65 72 0d 09 09 72 3d 73 |it, bigg|er...r=s|
|00000980| 6d 61 6c 6c 57 6f 72 6c | 64 2d 3e 70 6f 72 74 52 |mallWorl|d->portR|
|00000990| 65 63 74 3b 0d 09 09 45 | 78 70 61 6e 64 52 65 63 |ect;...E|xpandRec|
|000009a0| 74 28 26 72 2c 65 78 70 | 61 6e 64 2c 65 78 70 61 |t(&r,exp|and,expa|
|000009b0| 6e 64 29 3b 0d 09 09 70 | 72 69 6e 74 66 28 22 48 |nd);...p|rintf("H|
|000009c0| 69 74 20 72 65 74 75 72 | 6e 20 74 6f 20 63 6f 6e |it retur|n to con|
|000009d0| 74 69 6e 75 65 2e 5c 6e | 22 29 3b 0d 09 09 67 65 |tinue.\n|");...ge|
|000009e0| 74 73 28 73 74 72 69 6e | 67 29 3b 0d 09 09 53 69 |ts(strin|g);...Si|
|000009f0| 7a 65 57 69 6e 64 6f 77 | 28 77 69 6e 64 6f 77 2c |zeWindow|(window,|
|00000a00| 72 2e 72 69 67 68 74 2c | 72 2e 62 6f 74 74 6f 6d |r.right,|r.bottom|
|00000a10| 2c 31 29 3b 0d 09 09 43 | 65 6e 74 65 72 52 65 63 |,1);...C|enterRec|
|00000a20| 74 49 6e 52 65 63 74 28 | 26 72 2c 26 77 69 6e 64 |tInRect(|&r,&wind|
|00000a30| 6f 77 2d 3e 70 6f 72 74 | 52 65 63 74 29 3b 0d 09 |ow->port|Rect);..|
|00000a40| 09 65 72 72 6f 72 3d 43 | 6f 70 79 57 69 6e 64 6f |.error=C|opyWindo|
|00000a50| 77 73 28 73 6d 61 6c 6c | 57 6f 72 6c 64 2c 28 43 |ws(small|World,(C|
|00000a60| 57 69 6e 64 6f 77 50 74 | 72 29 77 69 6e 64 6f 77 |WindowPt|r)window|
|00000a70| 2c 26 73 6d 61 6c 6c 57 | 6f 72 6c 64 2d 3e 70 6f |,&smallW|orld->po|
|00000a80| 72 74 52 65 63 74 2c 26 | 72 2c 63 6f 70 79 4d 6f |rtRect,&|r,copyMo|
|00000a90| 64 65 2c 4e 55 4c 4c 29 | 3b 0d 09 09 69 66 28 65 |de,NULL)|;...if(e|
|00000aa0| 72 72 6f 72 29 50 72 69 | 6e 74 66 45 78 69 74 28 |rror)Pri|ntfExit(|
|00000ab0| 22 25 73 20 6c 69 6e 65 | 20 25 64 3a 20 43 6f 70 |"%s line| %d: Cop|
|00000ac0| 79 57 69 6e 64 6f 77 73 | 20 65 72 72 6f 72 20 25 |yWindows| error %|
|00000ad0| 64 5c 6e 22 2c 5f 5f 46 | 49 4c 45 5f 5f 2c 5f 5f |d\n",__F|ILE__,__|
|00000ae0| 4c 49 4e 45 5f 5f 2c 65 | 72 72 6f 72 29 3b 0d 09 |LINE__,e|rror);..|
|00000af0| 7d 0d 0d 09 69 66 28 73 | 61 76 65 50 69 63 74 29 |}...if(s|avePict)|
|00000b00| 7b 0d 09 09 73 70 72 69 | 6e 74 66 28 73 74 72 69 |{...spri|ntf(stri|
|00000b10| 6e 67 2c 22 25 73 2e 70 | 69 63 74 22 2c 66 69 6c |ng,"%s.p|ict",fil|
|00000b20| 65 6e 61 6d 65 29 3b 0d | 09 09 50 69 78 4d 61 70 |ename);.|..PixMap|
|00000b30| 54 6f 50 49 43 54 28 73 | 74 72 69 6e 67 2c 73 6d |ToPICT(s|tring,sm|
|00000b40| 61 6c 6c 57 6f 72 6c 64 | 2d 3e 70 6f 72 74 50 69 |allWorld|->portPi|
|00000b50| 78 4d 61 70 0d 09 09 09 | 2c 26 73 6d 61 6c 6c 57 |xMap....|,&smallW|
|00000b60| 6f 72 6c 64 2d 3e 70 6f | 72 74 52 65 63 74 2c 32 |orld->po|rtRect,2|
|00000b70| 2c 4e 55 4c 4c 29 3b 0d | 09 09 70 72 69 6e 74 66 |,NULL);.|..printf|
|00000b80| 28 22 49 6d 61 67 65 20 | 77 61 73 20 73 61 76 65 |("Image |was save|
|00000b90| 64 20 74 6f 20 64 69 73 | 6b 20 61 73 20 66 69 6c |d to dis|k as fil|
|00000ba0| 65 20 d2 25 73 d3 2e 5c | 6e 22 2c 73 74 72 69 6e |e .%s..\|n",strin|
|00000bb0| 67 29 3b 0d 09 7d 0d 09 | 69 66 28 73 61 76 65 45 |g);..}..|if(saveE|
|00000bc0| 50 53 29 7b 0d 09 09 70 | 61 67 65 52 65 63 74 3d |PS){...p|ageRect=|
|00000bd0| 73 6d 61 6c 6c 57 6f 72 | 6c 64 2d 3e 70 6f 72 74 |smallWor|ld->port|
|00000be0| 52 65 63 74 3b 0d 09 09 | 45 78 70 61 6e 64 52 65 |Rect;...|ExpandRe|
|00000bf0| 63 74 28 26 70 61 67 65 | 52 65 63 74 2c 65 78 70 |ct(&page|Rect,exp|
|00000c00| 61 6e 64 2c 65 78 70 61 | 6e 64 29 3b 0d 09 09 70 |and,expa|nd);...p|
|00000c10| 61 67 65 52 65 63 74 2e | 74 6f 70 2a 3d 2d 31 3b |ageRect.|top*=-1;|
|00000c20| 09 09 2f 2f 20 63 6f 6e | 76 65 72 74 20 66 72 6f |..// con|vert fro|
|00000c30| 6d 20 41 70 70 6c 65 20 | 74 6f 20 41 64 6f 62 65 |m Apple |to Adobe|
|00000c40| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 0d 09 09 70 | coordin|ates...p|
|00000c50| 61 67 65 52 65 63 74 2e | 62 6f 74 74 6f 6d 2a 3d |ageRect.|bottom*=|
|00000c60| 2d 31 3b 09 2f 2f 20 63 | 6f 6e 76 65 72 74 20 66 |-1;.// c|onvert f|
|00000c70| 72 6f 6d 20 41 70 70 6c | 65 20 74 6f 20 41 64 6f |rom Appl|e to Ado|
|00000c80| 62 65 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 0d 09 |be coord|inates..|
|00000c90| 09 53 65 74 52 65 63 74 | 28 26 70 61 70 65 72 52 |.SetRect|(&paperR|
|00000ca0| 65 63 74 2c 30 2c 31 31 | 2a 37 32 2c 38 2e 35 2a |ect,0,11|*72,8.5*|
|00000cb0| 37 32 2c 30 29 3b 0d 09 | 09 43 65 6e 74 65 72 52 |72,0);..|.CenterR|
|00000cc0| 65 63 74 49 6e 52 65 63 | 74 28 26 70 61 67 65 52 |ectInRec|t(&pageR|
|00000cd0| 65 63 74 2c 26 70 61 70 | 65 72 52 65 63 74 29 3b |ect,&pap|erRect);|
|00000ce0| 0d 09 09 73 70 72 69 6e | 74 66 28 73 74 72 69 6e |...sprin|tf(strin|
|00000cf0| 67 2c 22 25 73 2e 65 70 | 73 22 2c 66 69 6c 65 6e |g,"%s.ep|s",filen|
|00000d00| 61 6d 65 29 3b 0d 09 09 | 57 69 6e 64 6f 77 54 6f |ame);...|WindowTo|
|00000d10| 45 50 53 28 73 6d 61 6c | 6c 57 6f 72 6c 64 2c 73 |EPS(smal|lWorld,s|
|00000d20| 74 72 69 6e 67 2c 26 73 | 6d 61 6c 6c 57 6f 72 6c |tring,&s|mallWorl|
|00000d30| 64 2d 3e 70 6f 72 74 52 | 65 63 74 2c 26 70 61 67 |d->portR|ect,&pag|
|00000d40| 65 52 65 63 74 2c 30 2c | 30 2c 4e 55 4c 4c 29 3b |eRect,0,|0,NULL);|
|00000d50| 0d 09 09 70 72 69 6e 74 | 66 28 22 49 6d 61 67 65 |...print|f("Image|
|00000d60| 20 77 61 73 20 73 61 76 | 65 64 20 74 6f 20 64 69 | was sav|ed to di|
|00000d70| 73 6b 20 61 73 20 66 69 | 6c 65 20 d2 25 73 d3 2e |sk as fi|le .%s..|
|00000d80| 5c 6e 22 2c 73 74 72 69 | 6e 67 29 3b 0d 09 7d 0d |\n",stri|ng);..}.|
|00000d90| 09 70 72 69 6e 74 66 28 | 22 48 69 74 20 72 65 74 |.printf(|"Hit ret|
|00000da0| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|00000db0| 5c 6e 22 29 3b 0d 09 67 | 65 74 73 28 73 74 72 69 |\n");..g|ets(stri|
|00000dc0| 6e 67 29 3b 0d 09 47 44 | 44 69 73 70 6f 73 65 57 |ng);..GD|DisposeW|
|00000dd0| 69 6e 64 6f 77 31 28 77 | 69 6e 64 6f 77 29 3b 0d |indow1(w|indow);.|
|00000de0| 09 52 65 73 74 6f 72 65 | 44 65 76 69 63 65 43 6c |.Restore|DeviceCl|
|00000df0| 75 74 28 64 65 76 69 63 | 65 29 3b 0d 7d 00 00 00 |ut(devic|e);.}...|
|00000e00| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000e10| 39 38 36 39 62 36 37 65 | 36 32 38 39 61 63 37 63 |9869b67e|6289ac7c|
|00000e20| 38 31 39 37 39 30 37 39 | 36 33 35 63 38 32 38 62 |81979079|635c828b|
|00000e30| 13 53 68 6f 77 41 6e 64 | 53 61 76 65 47 57 6f 72 |.ShowAnd|SaveGWor|
|00000e40| 6c 64 2e 63 02 00 00 00 | 54 45 58 54 43 57 49 45 |ld.c....|TEXTCWIE|
|00000e50| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 78 05 40 |..TEXTCW|IE...x.@|
|00000e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e70| 00 00 ac 1c 73 c6 00 00 | 0d 7d 00 00 01 9a 37 63 |....s...|.}....7c|
|00000e80| 39 36 38 30 39 62 61 30 | 38 36 39 65 61 62 39 39 |96809ba0|869eab99|
|00000e90| 62 34 37 33 36 66 34 36 | 61 32 36 38 37 31 35 66 |b4736f46|a268715f|
|00000ea0| 62 36 39 66 38 35 34 31 | 62 63 36 64 61 66 38 35 |b69f8541|bc6daf85|
|00000eb0| 35 37 38 33 38 35 37 34 | 35 64 34 63 37 65 37 33 |57838574|5d4c7e73|
|00000ec0| 38 31 39 64 38 61 39 64 | 62 39 36 62 37 62 62 62 |819d8a9d|b96b7bbb|
|00000ed0| 36 36 39 39 37 66 37 34 | 38 32 35 30 39 62 38 64 |66997f74|82509b8d|
|00000ee0| 61 32 39 31 38 32 35 37 | 39 63 37 61 39 61 36 34 |a2918257|9c7a9a64|
|00000ef0| 37 34 39 39 37 31 37 36 | 38 35 38 65 38 61 36 35 |74997176|858e8a65|
|00000f00| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 03 | 00 04 00 69 00 9b 02 6a |........|...i...j|
|00000f30| 02 fa 00 69 00 9b 02 6a | 02 fa ac 33 d0 f3 00 00 |...i...j|...3....|
|00000f40| 04 8d 00 00 04 9e 00 00 | 00 00 01 00 00 00 00 04 |........|........|
|00000f50| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000f60| 00 00 00 46 01 99 5f e8 | 1b 8c 00 00 00 1c 00 46 |...F.._.|.......F|
|00000f70| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000f80| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000f90| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+