home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / Videotoolbox 96-08-22-c.sit / VideoToolbox / VideoToolboxSources / StringBounds.c < prev    next >
MacBinary  |  1995-11-02  |  12.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: StringBounds.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 Nov 2 15:36:58 1995, modified Thu Nov 2 15:36:58 1995, creator 'CWIE', type ASCII, 10199 bytes "StringBounds.c" , at 0x2857 1804 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 0e 53 74 72 69 6e 67 | 42 6f 75 6e 64 73 2e 63 |..String|Bounds.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 27 d7 00 | 00 07 0c ac be dc 6a ac |.....'..|......j.|
|00000060| be dc 6a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..j.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ce ac 00 00 |........|........|
|00000080| 2f 2a 0d 53 74 72 69 6e | 67 42 6f 75 6e 64 73 2e |/*.Strin|gBounds.|
|00000090| 63 0d 0d 09 76 6f 69 64 | 20 47 65 74 42 6f 75 6e |c...void| GetBoun|
|000000a0| 64 73 28 47 57 6f 72 6c | 64 50 74 72 20 77 69 6e |ds(GWorl|dPtr win|
|000000b0| 64 6f 77 2c 52 65 63 74 | 20 2a 72 65 63 74 50 74 |dow,Rect| *rectPt|
|000000c0| 72 2c 52 65 63 74 20 2a | 62 6f 75 6e 64 73 50 74 |r,Rect *|boundsPt|
|000000d0| 72 2c 6c 6f 6e 67 20 2a | 69 6e 6b 41 72 65 61 50 |r,long *|inkAreaP|
|000000e0| 74 72 29 3b 0d 52 65 74 | 75 72 6e 20 74 68 65 20 |tr);.Ret|urn the |
|000000f0| 73 6d 61 6c 6c 65 73 74 | 20 62 6f 75 6e 64 69 6e |smallest| boundin|
|00000100| 67 20 62 6f 78 20 63 6f | 6e 74 61 69 6e 69 6e 67 |g box co|ntaining|
|00000110| 20 61 6c 6c 20 6e 6f 6e | 7a 65 72 6f 20 70 69 78 | all non|zero pix|
|00000120| 65 6c 73 2c 20 61 6e 64 | 20 61 20 63 6f 75 6e 74 |els, and| a count|
|00000130| 20 6f 66 20 74 68 65 20 | 6e 6f 6e 7a 65 72 6f 20 | of the |nonzero |
|00000140| 70 69 78 65 6c 73 2e 0d | 0d 09 76 6f 69 64 20 53 |pixels..|..void S|
|00000150| 74 72 42 6f 75 6e 64 73 | 28 63 68 61 72 20 2a 73 |trBounds|(char *s|
|00000160| 74 72 2c 52 65 63 74 20 | 2a 62 6f 75 6e 64 73 2c |tr,Rect |*bounds,|
|00000170| 6c 6f 6e 67 20 2a 69 6e | 6b 41 72 65 61 29 3b 0d |long *in|kArea);.|
|00000180| 09 76 6f 69 64 20 53 74 | 72 69 6e 67 42 6f 75 6e |.void St|ringBoun|
|00000190| 64 73 28 63 6f 6e 73 74 | 20 75 6e 73 69 67 6e 65 |ds(const| unsigne|
|000001a0| 64 20 63 68 61 72 20 2a | 73 74 72 69 6e 67 2c 52 |d char *|string,R|
|000001b0| 65 63 74 20 2a 62 6f 75 | 6e 64 73 2c 6c 6f 6e 67 |ect *bou|nds,long|
|000001c0| 20 2a 69 6e 6b 41 72 65 | 61 29 3b 0d 53 74 72 42 | *inkAre|a);.StrB|
|000001d0| 6f 75 6e 64 73 20 61 63 | 63 65 70 74 73 20 61 20 |ounds ac|cepts a |
|000001e0| 43 20 73 74 72 69 6e 67 | 2e 20 53 74 72 69 6e 67 |C string|. String|
|000001f0| 42 6f 75 6e 64 73 20 61 | 63 63 65 70 74 73 20 61 |Bounds a|ccepts a|
|00000200| 20 70 61 73 63 61 6c 20 | 73 74 72 69 6e 67 2e 0d | pascal |string..|
|00000210| 42 6f 74 68 20 72 6f 75 | 74 69 6e 65 73 20 63 6f |Both rou|tines co|
|00000220| 75 6e 74 2d 2d 61 6e 64 | 20 63 6f 6d 70 75 74 65 |unt--and| compute|
|00000230| 20 74 68 65 20 6d 69 6e | 69 6d 75 6d 20 62 6f 75 | the min|imum bou|
|00000240| 6e 64 69 6e 67 20 72 65 | 63 74 61 6e 67 6c 65 20 |nding re|ctangle |
|00000250| 66 6f 72 2d 2d 61 6c 6c | 20 74 68 65 20 70 69 78 |for--all| the pix|
|00000260| 65 6c 73 20 74 68 61 74 | 0d 77 6f 75 6c 64 20 62 |els that|.would b|
|00000270| 65 20 73 65 74 20 62 6c | 61 63 6b 20 62 79 20 63 |e set bl|ack by c|
|00000280| 61 6c 6c 69 6e 67 20 44 | 72 61 77 53 74 72 69 6e |alling D|rawStrin|
|00000290| 67 20 77 69 74 68 20 74 | 68 65 20 67 69 76 65 6e |g with t|he given|
|000002a0| 20 73 74 72 69 6e 67 20 | 77 69 74 68 20 74 68 65 | string |with the|
|000002b0| 0d 63 75 72 72 65 6e 74 | 20 70 6f 72 74 27 73 20 |.current| port's |
|000002c0| 66 6f 6e 74 2c 20 73 69 | 7a 65 2c 20 61 6e 64 20 |font, si|ze, and |
|000002d0| 73 74 79 6c 65 2e 20 43 | 6f 6f 72 64 69 6e 61 74 |style. C|oordinat|
|000002e0| 65 73 20 69 6e 20 74 68 | 65 20 2a 62 6f 75 6e 64 |es in th|e *bound|
|000002f0| 73 20 72 65 63 74 20 61 | 72 65 0d 72 65 6c 61 74 |s rect a|re.relat|
|00000300| 69 76 65 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |ive to t|he curre|
|00000310| 6e 74 20 70 65 6e 20 70 | 6f 73 69 74 69 6f 6e 2e |nt pen p|osition.|
|00000320| 20 49 66 20 6e 6f 20 70 | 69 78 65 6c 73 20 77 6f | If no p|ixels wo|
|00000330| 75 6c 64 20 62 65 20 73 | 65 74 20 74 68 65 6e 20 |uld be s|et then |
|00000340| 2a 62 6f 75 6e 64 73 20 | 69 73 0d 73 65 74 20 74 |*bounds |is.set t|
|00000350| 6f 20 74 68 65 20 65 6d | 70 74 79 20 72 65 63 74 |o the em|pty rect|
|00000360| 20 28 30 2c 30 2c 30 2c | 30 29 2e 20 54 68 65 20 | (0,0,0,|0). The |
|00000370| 63 75 72 72 65 6e 74 20 | 70 6f 72 74 20 69 73 20 |current |port is |
|00000380| 6c 65 66 74 20 75 6e 74 | 6f 75 63 68 65 64 2e 0d |left unt|ouched..|
|00000390| 0d 54 68 65 20 6d 65 61 | 73 75 72 65 6d 65 6e 74 |.The mea|surement|
|000003a0| 73 20 61 72 65 20 62 61 | 73 65 64 20 6f 6e 20 61 |s are ba|sed on a|
|000003b0| 20 66 75 6c 6c 20 72 65 | 6e 64 65 72 69 6e 67 20 | full re|ndering |
|000003c0| 6f 66 20 74 68 65 20 73 | 74 72 69 6e 67 20 69 6e |of the s|tring in|
|000003d0| 20 61 20 70 72 69 76 61 | 74 65 0d 47 57 6f 72 6c | a priva|te.GWorl|
|000003e0| 64 2c 20 77 69 74 68 6f | 75 74 20 61 6e 79 20 63 |d, witho|ut any c|
|000003f0| 6c 69 70 70 69 6e 67 2e | 0d 0d 54 68 65 20 62 6f |lipping.|..The bo|
|00000400| 75 6e 64 73 20 61 6e 64 | 20 69 6e 6b 41 72 65 61 |unds and| inkArea|
|00000410| 20 61 72 67 75 6d 65 6e | 74 73 20 61 72 65 20 6f | argumen|ts are o|
|00000420| 70 74 69 6f 6e 61 6c 3b | 20 74 68 65 79 20 6d 61 |ptional;| they ma|
|00000430| 79 20 62 65 20 72 65 70 | 6c 61 63 65 64 20 62 79 |y be rep|laced by|
|00000440| 20 4e 55 4c 4c 2e 0d 0d | 09 76 6f 69 64 20 43 68 | NULL...|.void Ch|
|00000450| 61 72 42 6f 75 6e 64 73 | 28 63 68 61 72 20 61 2c |arBounds|(char a,|
|00000460| 52 65 63 74 20 2a 62 6f | 75 6e 64 73 2c 6c 6f 6e |Rect *bo|unds,lon|
|00000470| 67 20 2a 69 6e 6b 41 72 | 65 61 29 3b 0d 43 72 65 |g *inkAr|ea);.Cre|
|00000480| 61 74 65 73 20 61 20 6f | 6e 65 2d 63 68 61 72 20 |ates a o|ne-char |
|00000490| 73 74 72 69 6e 67 20 61 | 6e 64 20 63 61 6c 6c 73 |string a|nd calls|
|000004a0| 20 53 74 72 69 6e 67 42 | 6f 75 6e 64 73 28 29 2e | StringB|ounds().|
|000004b0| 0d 0d 09 64 6f 75 62 6c | 65 20 53 74 72 4f 75 74 |...doubl|e StrOut|
|000004c0| 6c 69 6e 65 4c 65 6e 67 | 74 68 28 63 68 61 72 20 |lineLeng|th(char |
|000004d0| 2a 73 29 3b 0d 09 64 6f | 75 62 6c 65 20 53 74 72 |*s);..do|uble Str|
|000004e0| 69 6e 67 4f 75 74 6c 69 | 6e 65 4c 65 6e 67 74 68 |ingOutli|neLength|
|000004f0| 28 63 6f 6e 73 74 20 75 | 6e 73 69 67 6e 65 64 20 |(const u|nsigned |
|00000500| 63 68 61 72 20 2a 73 29 | 3b 0d 4d 65 61 73 75 72 |char *s)|;.Measur|
|00000510| 65 20 74 68 65 20 6f 75 | 74 6c 69 6e 65 20 6c 65 |e the ou|tline le|
|00000520| 6e 67 74 68 20 6f 66 20 | 61 20 73 74 72 69 6e 67 |ngth of |a string|
|00000530| 2c 20 69 6e 20 70 69 78 | 65 6c 73 2e 20 46 6f 72 |, in pix|els. For|
|00000540| 6d 65 72 6c 79 20 28 62 | 65 66 6f 72 65 20 32 2f |merly (b|efore 2/|
|00000550| 32 30 2f 39 35 29 0d 49 | 20 74 68 6f 75 67 68 74 |20/95).I| thought|
|00000560| 20 69 74 20 77 61 73 20 | 65 6e 6f 75 67 68 20 74 | it was |enough t|
|00000570| 6f 20 6a 75 73 74 20 63 | 6f 75 6e 74 20 74 68 65 |o just c|ount the|
|00000580| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 69 78 65 6c | number |of pixel|
|00000590| 73 20 69 6e 20 74 68 65 | 20 31 2d 70 69 78 65 6c |s in the| 1-pixel|
|000005a0| 20 74 68 69 63 6b 0d 6f | 75 74 6c 69 6e 65 20 74 | thick.o|utline t|
|000005b0| 68 61 74 20 6f 6e 65 20 | 6f 62 74 61 69 6e 73 20 |hat one |obtains |
|000005c0| 77 68 65 6e 20 64 72 61 | 77 69 6e 67 20 61 20 50 |when dra|wing a P|
|000005d0| 6f 73 74 53 63 72 69 70 | 74 20 6f 72 20 54 72 75 |ostScrip|t or Tru|
|000005e0| 65 54 79 70 65 20 63 68 | 61 72 61 63 74 65 72 20 |eType ch|aracter |
|000005f0| 69 6e 0d 6f 75 74 6c 69 | 6e 65 20 73 74 79 6c 65 |in.outli|ne style|
|00000600| 2e 20 48 6f 77 65 76 65 | 72 2c 20 49 20 6c 61 74 |. Howeve|r, I lat|
|00000610| 65 72 20 64 69 73 63 6f | 76 65 72 65 64 20 74 68 |er disco|vered th|
|00000620| 61 74 20 74 68 69 73 20 | 6f 6e 6c 79 20 67 69 76 |at this |only giv|
|00000630| 65 73 20 63 6f 72 72 65 | 63 74 20 72 65 73 75 6c |es corre|ct resul|
|00000640| 74 73 0d 66 6f 72 20 76 | 65 72 74 69 63 61 6c 20 |ts.for v|ertical |
|00000650| 61 6e 64 20 68 6f 72 69 | 7a 6f 6e 74 61 6c 20 73 |and hori|zontal s|
|00000660| 65 67 6d 65 6e 74 73 20 | 6f 66 20 74 68 65 20 74 |egments |of the t|
|00000670| 68 65 20 6f 75 74 6c 69 | 6e 65 2e 20 44 69 61 67 |he outli|ne. Diag|
|00000680| 6f 6e 61 6c 20 73 65 67 | 6d 65 6e 74 73 20 6f 66 |onal seg|ments of|
|00000690| 0d 74 68 65 20 6f 75 74 | 6c 69 6e 65 20 61 72 65 |.the out|line are|
|000006a0| 2c 20 6e 65 63 65 73 73 | 61 72 69 6c 79 2c 20 61 |, necess|arily, a|
|000006b0| 20 73 74 61 69 72 73 74 | 65 70 2c 20 73 6f 20 61 | stairst|ep, so a|
|000006c0| 20 70 69 78 65 6c 20 63 | 6f 75 6e 74 20 79 69 65 | pixel c|ount yie|
|000006d0| 6c 64 73 20 61 20 63 69 | 74 79 2d 62 6c 6f 63 6b |lds a ci|ty-block|
|000006e0| 0d 70 61 74 68 20 6c 65 | 6e 67 74 68 2e 20 46 6f |.path le|ngth. Fo|
|000006f0| 72 20 61 20 34 35 20 64 | 65 67 20 73 6c 6f 70 65 |r a 45 d|eg slope|
|00000700| 20 74 68 65 20 70 69 78 | 65 6c 20 63 6f 75 6e 74 | the pix|el count|
|00000710| 20 69 73 20 74 6f 6f 20 | 68 69 67 68 20 62 79 20 | is too |high by |
|00000720| 61 20 66 61 63 74 6f 72 | 20 6f 66 0d 73 71 75 61 |a factor| of.squa|
|00000730| 72 65 20 72 6f 6f 74 20 | 6f 66 20 32 2c 20 69 2e |re root |of 2, i.|
|00000740| 65 2e 20 62 79 20 72 6f | 75 67 68 6c 79 20 61 20 |e. by ro|ughly a |
|00000750| 66 61 63 74 6f 72 20 6f | 66 20 31 2e 35 2e 20 53 |factor o|f 1.5. S|
|00000760| 74 72 69 6e 67 4f 75 74 | 6c 69 6e 65 4c 65 6e 67 |tringOut|lineLeng|
|00000770| 74 68 28 29 20 74 72 69 | 65 73 0d 74 6f 20 70 72 |th() tri|es.to pr|
|00000780| 6f 76 69 64 65 20 61 20 | 6d 6f 72 65 20 61 63 63 |ovide a |more acc|
|00000790| 75 72 61 74 65 20 65 73 | 74 69 6d 61 74 65 20 6f |urate es|timate o|
|000007a0| 66 20 6f 75 74 6c 69 6e | 65 20 6c 65 6e 67 74 68 |f outlin|e length|
|000007b0| 2e 20 49 74 20 63 72 65 | 61 74 65 73 20 74 68 65 |. It cre|ates the|
|000007c0| 20 31 2d 70 69 78 65 6c | 0d 6f 75 74 6c 69 6e 65 | 1-pixel|.outline|
|000007d0| 20 61 6e 64 20 74 68 65 | 6e 20 74 68 69 63 6b 65 | and the|n thicke|
|000007e0| 6e 73 20 69 74 20 62 79 | 20 72 65 70 65 61 74 65 |ns it by| repeate|
|000007f0| 64 6c 79 20 4f 52 69 6e | 67 20 74 68 65 20 69 6d |dly ORin|g the im|
|00000800| 61 67 65 20 77 69 74 68 | 20 69 74 73 65 6c 66 2c |age with| itself,|
|00000810| 20 73 68 69 66 74 65 64 | 0d 62 79 20 6f 6e 65 20 | shifted|.by one |
|00000820| 70 69 78 65 6c 3a 20 6c | 65 66 74 2c 20 72 69 67 |pixel: l|eft, rig|
|00000830| 68 74 2c 20 75 70 2c 20 | 61 6e 64 20 64 6f 77 6e |ht, up, |and down|
|00000840| 2e 20 54 68 69 73 20 68 | 61 73 20 74 68 65 20 65 |. This h|as the e|
|00000850| 66 66 65 63 74 20 6f 66 | 20 74 72 69 70 6c 69 6e |ffect of| triplin|
|00000860| 67 20 74 68 65 0d 74 68 | 69 63 6b 6e 65 73 73 20 |g the.th|ickness |
|00000870| 6f 66 20 68 6f 72 69 7a | 6f 6e 74 61 6c 20 61 6e |of horiz|ontal an|
|00000880| 64 20 76 65 72 74 69 63 | 61 6c 20 6c 69 6e 65 73 |d vertic|al lines|
|00000890| 2c 20 66 72 6f 6d 20 31 | 20 74 6f 20 33 20 70 69 |, from 1| to 3 pi|
|000008a0| 78 65 6c 73 2c 20 61 6e | 64 20 64 6f 75 62 6c 69 |xels, an|d doubli|
|000008b0| 6e 67 20 74 68 65 0d 74 | 68 69 63 6b 6e 65 73 73 |ng the.t|hickness|
|000008c0| 20 6f 66 20 34 35 20 64 | 65 67 20 64 69 61 67 6f | of 45 d|eg diago|
|000008d0| 6e 61 6c 20 6c 69 6e 65 | 73 2e 20 53 69 6e 63 65 |nal line|s. Since|
|000008e0| 20 74 68 65 20 64 69 61 | 67 6f 6e 61 6c 20 6c 69 | the dia|gonal li|
|000008f0| 6e 65 73 20 77 65 72 65 | 20 61 6c 72 65 61 64 79 |nes were| already|
|00000900| 0d 70 72 6f 76 69 64 69 | 6e 67 20 61 62 6f 75 74 |.providi|ng about|
|00000910| 20 31 2e 35 20 74 69 6d | 65 73 20 61 73 20 6d 61 | 1.5 tim|es as ma|
|00000920| 6e 79 20 70 69 78 65 6c | 73 20 61 73 20 74 68 65 |ny pixel|s as the|
|00000930| 20 74 72 75 65 20 6c 65 | 6e 67 74 68 2c 20 77 68 | true le|ngth, wh|
|00000940| 65 6e 20 64 6f 75 62 6c | 65 64 2c 20 74 68 65 79 |en doubl|ed, they|
|00000950| 0d 70 72 6f 76 69 64 65 | 20 74 72 69 70 6c 65 20 |.provide| triple |
|00000960| 74 68 65 20 6c 65 6e 67 | 74 68 2c 20 6a 75 73 74 |the leng|th, just|
|00000970| 20 6c 69 6b 65 20 74 68 | 65 20 68 6f 72 69 7a 6f | like th|e horizo|
|00000980| 6e 74 61 6c 20 61 6e 64 | 20 76 65 72 74 69 63 61 |ntal and| vertica|
|00000990| 6c 20 6c 69 6e 65 73 2e | 20 54 68 75 73 2c 20 74 |l lines.| Thus, t|
|000009a0| 6f 0d 61 20 66 69 72 73 | 74 20 6f 72 64 65 72 2c |o.a firs|t order,|
|000009b0| 20 74 68 65 20 6c 65 6e | 67 74 68 20 6d 65 61 73 | the len|gth meas|
|000009c0| 75 72 65 6d 65 6e 74 20 | 73 68 6f 75 6c 64 20 62 |urement |should b|
|000009d0| 65 20 69 6e 73 65 6e 73 | 69 74 69 76 65 20 74 6f |e insens|itive to|
|000009e0| 20 6f 72 69 65 6e 74 61 | 74 69 6f 6e 20 6f 66 0d | orienta|tion of.|
|000009f0| 74 68 65 20 73 65 67 6d | 65 6e 74 73 20 6f 66 20 |the segm|ents of |
|00000a00| 74 68 65 20 6f 75 74 6c | 69 6e 65 2e 0d 0d 4e 4f |the outl|ine...NO|
|00000a10| 54 45 53 0d 0d 62 6f 75 | 6e 64 73 2d 3e 72 69 67 |TES..bou|nds->rig|
|00000a20| 68 74 20 6e 65 65 64 20 | 6e 6f 74 20 65 78 61 63 |ht need |not exac|
|00000a30| 74 6c 79 20 65 71 75 61 | 6c 20 74 68 65 20 76 61 |tly equa|l the va|
|00000a40| 6c 75 65 20 72 65 74 75 | 72 6e 65 64 20 62 79 20 |lue retu|rned by |
|00000a50| 53 74 72 69 6e 67 57 69 | 64 74 68 28 73 29 2c 0d |StringWi|dth(s),.|
|00000a60| 62 65 63 61 75 73 65 20 | 53 74 72 69 6e 67 57 69 |because |StringWi|
|00000a70| 64 74 68 20 72 65 74 75 | 72 6e 73 20 74 68 65 20 |dth retu|rns the |
|00000a80| 64 69 73 70 6c 61 63 65 | 6d 65 6e 74 20 6f 66 20 |displace|ment of |
|00000a90| 74 68 65 20 70 65 6e 20 | 70 6f 73 69 74 69 6f 6e |the pen |position|
|00000aa0| 2c 20 61 6e 64 20 73 6f | 6d 65 20 28 65 2e 67 2e |, and so|me (e.g.|
|00000ab0| 0d 69 74 61 6c 69 63 29 | 20 63 68 61 72 61 63 74 |.italic)| charact|
|00000ac0| 65 72 73 20 65 78 74 65 | 6e 64 20 62 65 79 6f 6e |ers exte|nd beyon|
|00000ad0| 64 20 74 68 61 74 2c 20 | 77 68 69 6c 65 20 6f 74 |d that, |while ot|
|00000ae0| 68 65 72 73 20 28 65 2e | 67 2e 20 63 6f 6d 6d 61 |hers (e.|g. comma|
|00000af0| 29 20 65 78 74 65 6e 64 | 20 6c 65 73 73 0d 66 61 |) extend| less.fa|
|00000b00| 72 2e 20 53 69 6d 69 6c | 61 72 6c 79 2c 20 62 6f |r. Simil|arly, bo|
|00000b10| 75 6e 64 73 2d 3e 6c 65 | 66 74 20 6e 65 65 64 20 |unds->le|ft need |
|00000b20| 6e 6f 74 20 61 6c 77 61 | 79 73 20 62 65 20 7a 65 |not alwa|ys be ze|
|00000b30| 72 6f 2e 0d 0d 42 79 20 | 51 75 69 63 6b 44 72 61 |ro...By |QuickDra|
|00000b40| 77 27 73 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 2c 20 |w's conv|ention, |
|00000b50| 65 61 63 68 20 70 69 78 | 65 6c 20 69 73 20 63 6f |each pix|el is co|
|00000b60| 6e 73 69 64 65 72 65 64 | 20 74 6f 20 6c 69 65 20 |nsidered| to lie |
|00000b70| 62 65 6c 6f 77 20 61 6e | 64 20 74 6f 20 74 68 65 |below an|d to the|
|00000b80| 0d 72 69 67 68 74 20 6f | 66 20 74 68 65 20 70 6f |.right o|f the po|
|00000b90| 69 6e 74 20 74 68 61 74 | 20 69 73 20 75 73 65 64 |int that| is used|
|00000ba0| 20 74 6f 20 61 64 64 72 | 65 73 73 20 69 74 2e 20 | to addr|ess it. |
|00000bb0| 54 68 65 20 62 6f 75 6e | 64 69 6e 67 20 72 65 63 |The boun|ding rec|
|00000bc0| 74 61 6e 67 6c 65 20 66 | 6f 72 20 61 0d 70 69 78 |tangle f|or a.pix|
|00000bd0| 65 6c 20 61 74 20 78 2c | 79 2c 20 69 73 20 53 65 |el at x,|y, is Se|
|00000be0| 74 52 65 63 74 28 26 72 | 2c 78 2c 79 2c 78 2b 31 |tRect(&r|,x,y,x+1|
|00000bf0| 2c 79 2b 31 29 2e 0d 0d | 54 68 65 20 63 6f 64 65 |,y+1)...|The code|
|00000c00| 20 61 73 73 75 6d 65 73 | 20 46 6f 72 65 43 6f 6c | assumes| ForeCol|
|00000c10| 6f 72 20 69 73 20 62 6c | 61 63 6b 20 61 6e 64 20 |or is bl|ack and |
|00000c20| 74 68 61 74 20 54 65 78 | 74 4d 6f 64 65 20 69 73 |that Tex|tMode is|
|00000c30| 20 73 72 63 4f 72 2c 20 | 77 68 69 63 68 20 61 72 | srcOr, |which ar|
|00000c40| 65 20 74 68 65 20 0d 64 | 65 66 61 75 6c 74 20 73 |e the .d|efault s|
|00000c50| 65 74 74 69 6e 67 73 20 | 66 6f 72 20 74 68 65 20 |ettings |for the |
|00000c60| 47 57 6f 72 6c 64 20 74 | 68 61 74 20 77 65 20 63 |GWorld t|hat we c|
|00000c70| 72 65 61 74 65 2e 0d 0d | 48 49 53 54 4f 52 59 3a |reate...|HISTORY:|
|00000c80| 0d 31 2f 31 37 2f 39 34 | 20 64 67 70 20 77 72 6f |.1/17/94| dgp wro|
|00000c90| 74 65 20 69 74 2c 20 62 | 61 73 65 64 20 6f 6e 20 |te it, b|ased on |
|00000ca0| 64 69 73 63 75 73 73 69 | 6f 6e 20 77 69 74 68 20 |discussi|on with |
|00000cb0| 42 61 72 74 20 46 61 72 | 65 6c 6c 20 61 6e 64 20 |Bart Far|ell and |
|00000cc0| 4d 61 6e 6f 6a 20 47 75 | 6e 77 61 6e 69 2e 0d 32 |Manoj Gu|nwani..2|
|00000cd0| 2f 32 32 2f 39 34 09 64 | 67 70 09 61 64 64 65 64 |/22/94.d|gp.added|
|00000ce0| 20 69 6e 6b 41 72 65 61 | 20 61 72 67 75 6d 65 6e | inkArea| argumen|
|00000cf0| 74 2c 20 61 6e 64 20 6d | 61 64 65 20 62 6f 74 68 |t, and m|ade both|
|00000d00| 20 62 6f 75 6e 64 73 20 | 61 6e 64 20 69 6e 6b 41 | bounds |and inkA|
|00000d10| 72 65 61 20 6f 70 74 69 | 6f 6e 61 6c 2e 0d 32 2f |rea opti|onal..2/|
|00000d20| 32 37 2f 39 34 09 64 67 | 70 20 73 69 6e 63 65 20 |27/94.dg|p since |
|00000d30| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 69 73 20 |this rou|tine is |
|00000d40| 74 79 70 69 63 61 6c 6c | 79 20 63 61 6c 6c 65 64 |typicall|y called|
|00000d50| 20 72 65 70 65 61 74 65 | 64 6c 79 20 49 20 73 61 | repeate|dly I sa|
|00000d60| 76 65 20 74 69 6d 65 0d | 09 09 09 28 30 2e 32 20 |ve time.|...(0.2 |
|00000d70| 73 20 70 65 72 20 63 61 | 6c 6c 29 20 62 79 20 6f |s per ca|ll) by o|
|00000d80| 6e 6c 79 20 61 6c 6c 6f | 63 61 74 69 6e 67 20 74 |nly allo|cating t|
|00000d90| 68 65 20 47 57 6f 72 6c | 64 20 6f 6e 63 65 2c 20 |he GWorl|d once, |
|00000da0| 61 6e 64 20 6e 65 76 65 | 72 0d 09 09 09 66 72 65 |and neve|r....fre|
|00000db0| 65 69 6e 67 20 69 74 2e | 20 49 74 20 69 73 20 72 |eing it.| It is r|
|00000dc0| 65 75 73 65 64 20 6f 6e | 20 73 75 62 73 65 71 75 |eused on| subsequ|
|00000dd0| 65 6e 74 20 63 61 6c 6c | 73 2c 20 72 65 73 69 7a |ent call|s, resiz|
|00000de0| 65 64 20 61 70 70 72 6f | 70 72 69 61 74 65 6c 79 |ed appro|priately|
|00000df0| 0d 09 09 09 69 66 20 6e | 65 63 65 73 73 61 72 79 |....if n|ecessary|
|00000e00| 2e 0d 39 2f 35 2f 39 34 | 20 64 67 70 20 72 65 6d |..9/5/94| dgp rem|
|00000e10| 6f 76 65 64 20 61 73 73 | 75 6d 70 74 69 6f 6e 20 |oved ass|umption |
|00000e20| 69 6e 20 70 72 69 6e 74 | 66 27 73 20 74 68 61 74 |in print|f's that|
|00000e30| 20 69 6e 74 3d 3d 73 68 | 6f 72 74 2e 0d 31 31 2f | int==sh|ort..11/|
|00000e40| 32 2f 39 34 20 64 67 70 | 20 64 69 73 63 6f 76 65 |2/94 dgp| discove|
|00000e50| 72 65 64 20 74 68 61 74 | 20 74 68 65 20 63 6c 69 |red that| the cli|
|00000e60| 70 20 72 65 63 74 20 6d | 61 79 20 62 65 20 6e 6f |p rect m|ay be no|
|00000e70| 6e 73 65 6e 73 65 20 61 | 66 74 65 72 20 63 61 6c |nsense a|fter cal|
|00000e80| 6c 69 6e 67 0d 09 09 09 | 55 70 64 61 74 65 47 57 |ling....|UpdateGW|
|00000e90| 6f 72 6c 64 2c 20 73 6f | 20 49 20 73 65 74 20 69 |orld, so| I set i|
|00000ea0| 74 20 65 71 75 61 6c 20 | 74 6f 20 74 68 65 20 70 |t equal |to the p|
|00000eb0| 6f 72 74 52 65 63 74 2e | 0d 32 2f 32 30 2f 39 35 |ortRect.|.2/20/95|
|00000ec0| 20 64 67 70 20 41 64 64 | 65 64 20 53 74 72 69 6e | dgp Add|ed Strin|
|00000ed0| 67 4f 75 74 6c 69 6e 65 | 4c 65 6e 67 74 68 20 61 |gOutline|Length a|
|00000ee0| 6e 64 20 53 74 72 4f 75 | 74 6c 69 6e 65 4c 65 6e |nd StrOu|tlineLen|
|00000ef0| 67 74 68 2e 0d 32 2f 32 | 34 2f 39 35 20 64 67 70 |gth..2/2|4/95 dgp|
|00000f00| 20 46 69 78 65 64 20 61 | 62 6f 76 65 20 74 6f 20 | Fixed a|bove to |
|00000f10| 67 69 76 65 20 63 6f 72 | 72 65 63 74 20 6c 65 6e |give cor|rect len|
|00000f20| 67 74 68 20 65 76 65 6e | 20 77 68 65 6e 20 73 74 |gth even| when st|
|00000f30| 72 6f 6b 65 20 69 73 20 | 6f 6e 6c 79 20 6f 6e 65 |roke is |only one|
|00000f40| 20 70 69 78 65 6c 20 74 | 68 69 63 6b 2e 0d 2a 2f | pixel t|hick..*/|
|00000f50| 0d 23 69 6e 63 6c 75 64 | 65 20 22 56 69 64 65 6f |.#includ|e "Video|
|00000f60| 54 6f 6f 6c 62 6f 78 2e | 68 22 0d 23 64 65 66 69 |Toolbox.|h".#defi|
|00000f70| 6e 65 20 53 48 4f 57 5f | 42 49 54 4d 41 50 53 20 |ne SHOW_|BITMAPS |
|00000f80| 30 09 2f 2f 20 66 6f 72 | 20 64 65 62 75 67 67 69 |0.// for| debuggi|
|00000f90| 6e 67 0d 0d 64 6f 75 62 | 6c 65 20 53 74 72 4f 75 |ng..doub|le StrOu|
|00000fa0| 74 6c 69 6e 65 4c 65 6e | 67 74 68 28 63 68 61 72 |tlineLen|gth(char|
|00000fb0| 20 2a 73 29 3b 0d 64 6f | 75 62 6c 65 20 53 74 72 | *s);.do|uble Str|
|00000fc0| 69 6e 67 4f 75 74 6c 69 | 6e 65 4c 65 6e 67 74 68 |ingOutli|neLength|
|00000fd0| 28 63 6f 6e 73 74 20 75 | 6e 73 69 67 6e 65 64 20 |(const u|nsigned |
|00000fe0| 63 68 61 72 20 2a 73 29 | 3b 0d 0d 76 6f 69 64 20 |char *s)|;..void |
|00000ff0| 47 65 74 42 6f 75 6e 64 | 73 28 47 57 6f 72 6c 64 |GetBound|s(GWorld|
|00001000| 50 74 72 20 77 69 6e 64 | 6f 77 2c 52 65 63 74 20 |Ptr wind|ow,Rect |
|00001010| 2a 72 65 63 74 50 74 72 | 2c 52 65 63 74 20 2a 62 |*rectPtr|,Rect *b|
|00001020| 6f 75 6e 64 73 50 74 72 | 2c 6c 6f 6e 67 20 2a 69 |oundsPtr|,long *i|
|00001030| 6e 6b 41 72 65 61 50 74 | 72 29 3b 0d 0d 76 6f 69 |nkAreaPt|r);..voi|
|00001040| 64 20 47 65 74 42 6f 75 | 6e 64 73 28 47 57 6f 72 |d GetBou|nds(GWor|
|00001050| 6c 64 50 74 72 20 77 69 | 6e 64 6f 77 2c 52 65 63 |ldPtr wi|ndow,Rec|
|00001060| 74 20 2a 72 65 63 74 50 | 74 72 2c 52 65 63 74 20 |t *rectP|tr,Rect |
|00001070| 2a 62 6f 75 6e 64 73 50 | 74 72 2c 6c 6f 6e 67 20 |*boundsP|tr,long |
|00001080| 2a 69 6e 6b 41 72 65 61 | 50 74 72 29 0d 7b 0d 09 |*inkArea|Ptr).{..|
|00001090| 52 65 63 74 20 72 2c 62 | 6f 75 6e 64 73 3b 0d 09 |Rect r,b|ounds;..|
|000010a0| 47 57 6f 72 6c 64 50 74 | 72 20 6f 6c 64 50 6f 72 |GWorldPt|r oldPor|
|000010b0| 74 3b 0d 09 47 44 48 61 | 6e 64 6c 65 20 6f 6c 64 |t;..GDHa|ndle old|
|000010c0| 44 65 76 69 63 65 3b 0d | 09 72 65 67 69 73 74 65 |Device;.|.registe|
|000010d0| 72 20 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |r unsign|ed long |
|000010e0| 2a 70 69 78 3b 0d 09 72 | 65 67 69 73 74 65 72 20 |*pix;..r|egister |
|000010f0| 69 6e 74 20 78 2c 79 3b | 0d 09 72 65 67 69 73 74 |int x,y;|..regist|
|00001100| 65 72 20 6c 6f 6e 67 20 | 69 6e 6b 41 72 65 61 3d |er long |inkArea=|
|00001110| 30 3b 0d 09 6c 6f 6e 67 | 20 6e 3b 0d 0d 09 2f 2f |0;..long| n;...//|
|00001120| 20 6d 65 61 73 75 72 65 | 20 74 68 65 20 62 6f 75 | measure| the bou|
|00001130| 6e 64 69 6e 67 20 62 6f | 78 2c 20 61 6e 64 20 63 |nding bo|x, and c|
|00001140| 6f 75 6e 74 20 74 68 65 | 20 62 6c 61 63 6b 20 70 |ount the| black p|
|00001150| 69 78 65 6c 73 0d 09 47 | 65 74 47 57 6f 72 6c 64 |ixels..G|etGWorld|
|00001160| 28 26 6f 6c 64 50 6f 72 | 74 2c 26 6f 6c 64 44 65 |(&oldPor|t,&oldDe|
|00001170| 76 69 63 65 29 3b 0d 09 | 61 73 73 65 72 74 28 77 |vice);..|assert(w|
|00001180| 69 6e 64 6f 77 21 3d 4e | 55 4c 4c 29 3b 0d 09 53 |indow!=N|ULL);..S|
|00001190| 65 63 74 52 65 63 74 28 | 26 77 69 6e 64 6f 77 2d |ectRect(|&window-|
|000011a0| 3e 70 6f 72 74 52 65 63 | 74 2c 72 65 63 74 50 74 |>portRec|t,rectPt|
|000011b0| 72 2c 26 72 29 3b 0d 09 | 53 65 74 52 65 63 74 28 |r,&r);..|SetRect(|
|000011c0| 26 62 6f 75 6e 64 73 2c | 72 2e 72 69 67 68 74 2c |&bounds,|r.right,|
|000011d0| 72 2e 62 6f 74 74 6f 6d | 2c 72 2e 6c 65 66 74 2c |r.bottom|,r.left,|
|000011e0| 72 2e 74 6f 70 29 3b 0d | 09 6e 3d 72 2e 72 69 67 |r.top);.|.n=r.rig|
|000011f0| 68 74 2d 72 2e 6c 65 66 | 74 3b 0d 09 70 69 78 3d |ht-r.lef|t;..pix=|
|00001200| 28 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 2a |(unsigne|d long *|
|00001210| 29 4e 65 77 50 74 72 28 | 6e 2a 73 69 7a 65 6f 66 |)NewPtr(|n*sizeof|
|00001220| 28 2a 70 69 78 29 29 3b | 0d 09 69 66 28 70 69 78 |(*pix));|..if(pix|
|00001230| 3d 3d 4e 55 4c 4c 29 50 | 72 69 6e 74 66 45 78 69 |==NULL)P|rintfExi|
|00001240| 74 28 22 25 73 20 6c 69 | 6e 65 20 25 64 3a 20 43 |t("%s li|ne %d: C|
|00001250| 6f 75 6c 64 6e 27 74 20 | 61 6c 6c 6f 63 61 74 65 |ouldn't |allocate|
|00001260| 20 25 6c 64 20 62 79 74 | 65 73 2e 5c 6e 22 0d 09 | %ld byt|es.\n"..|
|00001270| 09 2c 5f 5f 46 49 4c 45 | 5f 5f 2c 5f 5f 4c 49 4e |.,__FILE|__,__LIN|
|00001280| 45 5f 5f 2c 6e 2a 73 69 | 7a 65 6f 66 28 6c 6f 6e |E__,n*si|zeof(lon|
|00001290| 67 29 29 3b 0d 09 69 66 | 28 49 73 47 72 61 66 50 |g));..if|(IsGrafP|
|000012a0| 74 72 28 77 69 6e 64 6f | 77 29 29 53 65 74 50 6f |tr(windo|w))SetPo|
|000012b0| 72 74 28 28 57 69 6e 64 | 6f 77 50 74 72 29 77 69 |rt((Wind|owPtr)wi|
|000012c0| 6e 64 6f 77 29 3b 0d 09 | 65 6c 73 65 20 53 65 74 |ndow);..|else Set|
|000012d0| 47 57 6f 72 6c 64 28 77 | 69 6e 64 6f 77 2c 47 65 |GWorld(w|indow,Ge|
|000012e0| 74 4d 61 69 6e 44 65 76 | 69 63 65 28 29 29 3b 0d |tMainDev|ice());.|
|000012f0| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 62 6f 75 |.OffsetR|ect(&bou|
|00001300| 6e 64 73 2c 2d 72 2e 6c | 65 66 74 2c 2d 72 2e 74 |nds,-r.l|eft,-r.t|
|00001310| 6f 70 29 3b 0d 09 66 6f | 72 28 79 3d 30 3b 79 3c |op);..fo|r(y=0;y<|
|00001320| 72 2e 62 6f 74 74 6f 6d | 2d 72 2e 74 6f 70 3b 79 |r.bottom|-r.top;y|
|00001330| 2b 2b 29 7b 0d 09 09 47 | 65 74 50 69 78 65 6c 73 |++){...G|etPixels|
|00001340| 51 75 69 63 6b 6c 79 28 | 72 2e 6c 65 66 74 2c 72 |Quickly(|r.left,r|
|00001350| 2e 74 6f 70 2b 79 2c 70 | 69 78 2c 6e 29 3b 0d 09 |.top+y,p|ix,n);..|
|00001360| 09 66 6f 72 28 78 3d 6e | 2d 31 3b 78 3e 3d 30 3b |.for(x=n|-1;x>=0;|
|00001370| 78 2d 2d 29 69 66 28 70 | 69 78 5b 78 5d 21 3d 30 |x--)if(p|ix[x]!=0|
|00001380| 29 7b 0d 09 09 09 69 6e | 6b 41 72 65 61 2b 2b 3b |){....in|kArea++;|
|00001390| 0d 09 09 09 69 66 28 78 | 3c 62 6f 75 6e 64 73 2e |....if(x|<bounds.|
|000013a0| 6c 65 66 74 29 62 6f 75 | 6e 64 73 2e 6c 65 66 74 |left)bou|nds.left|
|000013b0| 3d 78 3b 0d 09 09 09 69 | 66 28 78 3e 3d 62 6f 75 |=x;....i|f(x>=bou|
|000013c0| 6e 64 73 2e 72 69 67 68 | 74 29 62 6f 75 6e 64 73 |nds.righ|t)bounds|
|000013d0| 2e 72 69 67 68 74 3d 78 | 2b 31 3b 0d 09 09 09 69 |.right=x|+1;....i|
|000013e0| 66 28 79 3c 62 6f 75 6e | 64 73 2e 74 6f 70 29 62 |f(y<boun|ds.top)b|
|000013f0| 6f 75 6e 64 73 2e 74 6f | 70 3d 79 3b 0d 09 09 09 |ounds.to|p=y;....|
|00001400| 69 66 28 79 3e 3d 62 6f | 75 6e 64 73 2e 62 6f 74 |if(y>=bo|unds.bot|
|00001410| 74 6f 6d 29 62 6f 75 6e | 64 73 2e 62 6f 74 74 6f |tom)boun|ds.botto|
|00001420| 6d 3d 79 2b 31 3b 0d 09 | 09 7d 0d 09 7d 0d 09 53 |m=y+1;..|.}..}..S|
|00001430| 65 74 47 57 6f 72 6c 64 | 28 6f 6c 64 50 6f 72 74 |etGWorld|(oldPort|
|00001440| 2c 6f 6c 64 44 65 76 69 | 63 65 29 3b 0d 09 44 69 |,oldDevi|ce);..Di|
|00001450| 73 70 6f 73 65 50 74 72 | 28 28 76 6f 69 64 20 2a |sposePtr|((void *|
|00001460| 29 70 69 78 29 3b 09 0d | 09 4f 66 66 73 65 74 52 |)pix);..|.OffsetR|
|00001470| 65 63 74 28 26 62 6f 75 | 6e 64 73 2c 72 2e 6c 65 |ect(&bou|nds,r.le|
|00001480| 66 74 2c 72 2e 74 6f 70 | 29 3b 0d 09 69 66 28 45 |ft,r.top|);..if(E|
|00001490| 6d 70 74 79 52 65 63 74 | 28 26 62 6f 75 6e 64 73 |mptyRect|(&bounds|
|000014a0| 29 29 53 65 74 52 65 63 | 74 28 26 62 6f 75 6e 64 |))SetRec|t(&bound|
|000014b0| 73 2c 30 2c 30 2c 30 2c | 30 29 3b 0d 09 69 66 28 |s,0,0,0,|0);..if(|
|000014c0| 62 6f 75 6e 64 73 50 74 | 72 21 3d 4e 55 4c 4c 29 |boundsPt|r!=NULL)|
|000014d0| 2a 62 6f 75 6e 64 73 50 | 74 72 3d 62 6f 75 6e 64 |*boundsP|tr=bound|
|000014e0| 73 3b 0d 09 69 66 28 69 | 6e 6b 41 72 65 61 50 74 |s;..if(i|nkAreaPt|
|000014f0| 72 21 3d 4e 55 4c 4c 29 | 2a 69 6e 6b 41 72 65 61 |r!=NULL)|*inkArea|
|00001500| 50 74 72 3d 69 6e 6b 41 | 72 65 61 3b 0d 7d 0d 0d |Ptr=inkA|rea;.}..|
|00001510| 76 6f 69 64 20 43 68 61 | 72 42 6f 75 6e 64 73 28 |void Cha|rBounds(|
|00001520| 63 68 61 72 20 61 2c 52 | 65 63 74 20 2a 62 6f 75 |char a,R|ect *bou|
|00001530| 6e 64 73 50 74 72 2c 6c | 6f 6e 67 20 2a 69 6e 6b |ndsPtr,l|ong *ink|
|00001540| 41 72 65 61 50 74 72 29 | 0d 7b 0d 09 75 6e 73 69 |AreaPtr)|.{..unsi|
|00001550| 67 6e 65 64 20 63 68 61 | 72 20 73 74 72 69 6e 67 |gned cha|r string|
|00001560| 5b 5d 3d 22 5c 70 41 22 | 3b 0d 09 0d 09 73 74 72 |[]="\pA"|;....str|
|00001570| 69 6e 67 5b 31 5d 3d 61 | 3b 0d 09 53 74 72 69 6e |ing[1]=a|;..Strin|
|00001580| 67 42 6f 75 6e 64 73 28 | 73 74 72 69 6e 67 2c 62 |gBounds(|string,b|
|00001590| 6f 75 6e 64 73 50 74 72 | 2c 69 6e 6b 41 72 65 61 |oundsPtr|,inkArea|
|000015a0| 50 74 72 29 3b 0d 7d 0d | 0d 76 6f 69 64 20 53 74 |Ptr);.}.|.void St|
|000015b0| 72 42 6f 75 6e 64 73 28 | 63 68 61 72 20 2a 73 2c |rBounds(|char *s,|
|000015c0| 52 65 63 74 20 2a 62 6f | 75 6e 64 73 50 74 72 2c |Rect *bo|undsPtr,|
|000015d0| 6c 6f 6e 67 20 2a 69 6e | 6b 41 72 65 61 50 74 72 |long *in|kAreaPtr|
|000015e0| 29 0d 7b 0d 09 53 74 72 | 69 6e 67 42 6f 75 6e 64 |).{..Str|ingBound|
|000015f0| 73 28 63 32 70 73 74 72 | 28 73 29 2c 62 6f 75 6e |s(c2pstr|(s),boun|
|00001600| 64 73 50 74 72 2c 69 6e | 6b 41 72 65 61 50 74 72 |dsPtr,in|kAreaPtr|
|00001610| 29 3b 0d 09 70 32 63 73 | 74 72 28 28 75 6e 73 69 |);..p2cs|tr((unsi|
|00001620| 67 6e 65 64 20 63 68 61 | 72 20 2a 29 73 29 3b 0d |gned cha|r *)s);.|
|00001630| 7d 0d 0d 76 6f 69 64 20 | 53 74 72 69 6e 67 42 6f |}..void |StringBo|
|00001640| 75 6e 64 73 28 63 6f 6e | 73 74 20 75 6e 73 69 67 |unds(con|st unsig|
|00001650| 6e 65 64 20 63 68 61 72 | 20 2a 73 2c 52 65 63 74 |ned char| *s,Rect|
|00001660| 20 2a 62 6f 75 6e 64 73 | 50 74 72 2c 6c 6f 6e 67 | *bounds|Ptr,long|
|00001670| 20 2a 69 6e 6b 41 72 65 | 61 50 74 72 29 0d 7b 0d | *inkAre|aPtr).{.|
|00001680| 09 73 74 61 74 69 63 20 | 47 57 6f 72 6c 64 50 74 |.static |GWorldPt|
|00001690| 72 20 6f 75 72 3d 4e 55 | 4c 4c 3b 0d 09 47 57 6f |r our=NU|LL;..GWo|
|000016a0| 72 6c 64 50 74 72 20 6f | 6c 64 3b 0d 09 47 44 48 |rldPtr o|ld;..GDH|
|000016b0| 61 6e 64 6c 65 20 6f 6c | 64 44 65 76 69 63 65 3b |andle ol|dDevice;|
|000016c0| 0d 09 46 6f 6e 74 49 6e | 66 6f 20 66 3b 0d 20 20 |..FontIn|fo f;. |
|000016d0| 20 20 52 65 63 74 20 72 | 3b 0d 09 69 6e 74 20 65 | Rect r|;..int e|
|000016e0| 72 72 6f 72 3b 0d 09 63 | 68 61 72 20 73 74 72 69 |rror;..c|har stri|
|000016f0| 6e 67 5b 34 30 5d 3b 0d | 0d 09 61 73 73 65 72 74 |ng[40];.|..assert|
|00001700| 28 53 74 61 63 6b 53 70 | 61 63 65 28 29 3e 34 30 |(StackSp|ace()>40|
|00001710| 30 30 29 3b 0d 09 47 65 | 74 46 6f 6e 74 49 6e 66 |00);..Ge|tFontInf|
|00001720| 6f 28 26 66 29 3b 0d 09 | 53 65 74 52 65 63 74 28 |o(&f);..|SetRect(|
|00001730| 26 72 2c 30 2c 2d 66 2e | 61 73 63 65 6e 74 2c 53 |&r,0,-f.|ascent,S|
|00001740| 74 72 69 6e 67 57 69 64 | 74 68 28 73 29 2c 66 2e |tringWid|th(s),f.|
|00001750| 64 65 73 63 65 6e 74 29 | 3b 09 2f 2f 20 6e 6f 6d |descent)|;.// nom|
|00001760| 69 6e 61 6c 20 73 69 7a | 65 0d 09 49 6e 73 65 74 |inal siz|e..Inset|
|00001770| 52 65 63 74 28 26 72 2c | 2d 28 66 2e 77 69 64 4d |Rect(&r,|-(f.widM|
|00001780| 61 78 2b 32 29 2c 2d 28 | 66 2e 6c 65 61 64 69 6e |ax+2),-(|f.leadin|
|00001790| 67 2b 32 29 29 3b 20 09 | 09 2f 2f 20 61 64 64 20 |g+2)); .|.// add |
|000017a0| 6d 61 72 67 69 6e 0d 0d | 09 2f 2f 20 64 72 61 77 |margin..|.// draw|
|000017b0| 20 73 74 72 69 6e 67 20 | 69 6e 74 6f 20 61 20 6e | string |into a n|
|000017c0| 65 77 20 47 57 6f 72 6c | 64 0d 09 69 66 28 6f 75 |ew GWorl|d..if(ou|
|000017d0| 72 21 3d 4e 55 4c 4c 29 | 7b 0d 09 09 44 69 73 70 |r!=NULL)|{...Disp|
|000017e0| 6f 73 65 47 57 6f 72 6c | 64 28 6f 75 72 29 3b 0d |oseGWorl|d(our);.|
|000017f0| 09 09 6f 75 72 3d 4e 55 | 4c 4c 3b 0d 09 7d 0d 09 |..our=NU|LL;..}..|
|00001800| 69 66 28 6f 75 72 3d 3d | 4e 55 4c 4c 29 7b 0d 09 |if(our==|NULL){..|
|00001810| 09 65 72 72 6f 72 3d 4e | 65 77 47 57 6f 72 6c 64 |.error=N|ewGWorld|
|00001820| 28 26 6f 75 72 2c 31 2c | 26 72 2c 4e 55 4c 4c 2c |(&our,1,|&r,NULL,|
|00001830| 4e 55 4c 4c 2c 6b 65 65 | 70 4c 6f 63 61 6c 7c 75 |NULL,kee|pLocal|u|
|00001840| 73 65 54 65 6d 70 4d 65 | 6d 29 3b 0d 09 09 69 66 |seTempMe|m);...if|
|00001850| 28 65 72 72 6f 72 29 65 | 72 72 6f 72 3d 4e 65 77 |(error)e|rror=New|
|00001860| 47 57 6f 72 6c 64 28 26 | 6f 75 72 2c 31 2c 26 72 |GWorld(&|our,1,&r|
|00001870| 2c 4e 55 4c 4c 2c 4e 55 | 4c 4c 2c 6b 65 65 70 4c |,NULL,NU|LL,keepL|
|00001880| 6f 63 61 6c 29 3b 0d 09 | 7d 65 6c 73 65 7b 0d 09 |ocal);..|}else{..|
|00001890| 09 65 72 72 6f 72 3d 55 | 70 64 61 74 65 47 57 6f |.error=U|pdateGWo|
|000018a0| 72 6c 64 28 26 6f 75 72 | 2c 31 2c 26 72 2c 4e 55 |rld(&our|,1,&r,NU|
|000018b0| 4c 4c 2c 4e 55 4c 4c 2c | 63 6c 69 70 50 69 78 29 |LL,NULL,|clipPix)|
|000018c0| 3b 0d 09 09 61 73 73 65 | 72 74 28 45 71 75 61 6c |;...asse|rt(Equal|
|000018d0| 52 65 63 74 28 26 72 2c | 26 6f 75 72 2d 3e 70 6f |Rect(&r,|&our->po|
|000018e0| 72 74 52 65 63 74 29 29 | 3b 0d 09 09 61 73 73 65 |rtRect))|;...asse|
|000018f0| 72 74 28 28 2a 2a 6f 75 | 72 2d 3e 63 6c 69 70 52 |rt((**ou|r->clipR|
|00001900| 67 6e 29 2e 72 67 6e 53 | 69 7a 65 3d 3d 31 30 29 |gn).rgnS|ize==10)|
|00001910| 3b 0d 09 09 28 2a 2a 6f | 75 72 2d 3e 63 6c 69 70 |;...(**o|ur->clip|
|00001920| 52 67 6e 29 2e 72 67 6e | 42 42 6f 78 3d 6f 75 72 |Rgn).rgn|BBox=our|
|00001930| 2d 3e 70 6f 72 74 52 65 | 63 74 3b 0d 09 7d 0d 09 |->portRe|ct;..}..|
|00001940| 69 66 28 65 72 72 6f 72 | 29 50 72 69 6e 74 66 45 |if(error|)PrintfE|
|00001950| 78 69 74 28 22 53 74 72 | 69 6e 67 42 6f 75 6e 64 |xit("Str|ingBound|
|00001960| 73 3a 20 4e 65 77 47 57 | 6f 72 6c 64 2f 55 70 64 |s: NewGW|orld/Upd|
|00001970| 61 74 65 47 57 6f 72 6c | 64 20 65 72 72 6f 72 20 |ateGWorl|d error |
|00001980| 25 64 2e 5c 6e 22 2c 65 | 72 72 6f 72 29 3b 0d 09 |%d.\n",e|rror);..|
|00001990| 47 65 74 47 57 6f 72 6c | 64 28 26 6f 6c 64 2c 26 |GetGWorl|d(&old,&|
|000019a0| 6f 6c 64 44 65 76 69 63 | 65 29 3b 0d 09 53 65 74 |oldDevic|e);..Set|
|000019b0| 47 57 6f 72 6c 64 28 6f | 75 72 2c 4e 55 4c 4c 29 |GWorld(o|ur,NULL)|
|000019c0| 3b 0d 09 54 65 78 74 46 | 61 63 65 28 6f 6c 64 2d |;..TextF|ace(old-|
|000019d0| 3e 74 78 46 61 63 65 29 | 3b 0d 09 54 65 78 74 46 |>txFace)|;..TextF|
|000019e0| 6f 6e 74 28 6f 6c 64 2d | 3e 74 78 46 6f 6e 74 29 |ont(old-|>txFont)|
|000019f0| 3b 0d 09 54 65 78 74 53 | 69 7a 65 28 6f 6c 64 2d |;..TextS|ize(old-|
|00001a00| 3e 74 78 53 69 7a 65 29 | 3b 0d 09 45 72 61 73 65 |>txSize)|;..Erase|
|00001a10| 52 65 63 74 28 26 6f 75 | 72 2d 3e 70 6f 72 74 52 |Rect(&ou|r->portR|
|00001a20| 65 63 74 29 3b 0d 09 4d | 6f 76 65 54 6f 28 30 2c |ect);..M|oveTo(0,|
|00001a30| 30 29 3b 0d 09 44 72 61 | 77 53 74 72 69 6e 67 28 |0);..Dra|wString(|
|00001a40| 73 29 3b 0d 09 53 65 74 | 47 57 6f 72 6c 64 28 6f |s);..Set|GWorld(o|
|00001a50| 6c 64 2c 6f 6c 64 44 65 | 76 69 63 65 29 3b 0d 09 |ld,oldDe|vice);..|
|00001a60| 69 66 28 53 48 4f 57 5f | 42 49 54 4d 41 50 53 29 |if(SHOW_|BITMAPS)|
|00001a70| 7b 0d 09 09 50 72 69 6e | 74 66 47 57 6f 72 6c 64 |{...Prin|tfGWorld|
|00001a80| 28 6f 75 72 29 3b 0d 09 | 09 67 65 74 73 28 73 74 |(our);..|.gets(st|
|00001a90| 72 69 6e 67 29 3b 0d 09 | 7d 0d 0d 09 47 65 74 42 |ring);..|}...GetB|
|00001aa0| 6f 75 6e 64 73 28 6f 75 | 72 2c 26 6f 75 72 2d 3e |ounds(ou|r,&our->|
|00001ab0| 70 6f 72 74 52 65 63 74 | 2c 62 6f 75 6e 64 73 50 |portRect|,boundsP|
|00001ac0| 74 72 2c 69 6e 6b 41 72 | 65 61 50 74 72 29 3b 0d |tr,inkAr|eaPtr);.|
|00001ad0| 09 0d 09 69 66 28 53 48 | 4f 57 5f 42 49 54 4d 41 |...if(SH|OW_BITMA|
|00001ae0| 50 53 29 7b 0d 09 09 50 | 72 69 6e 74 66 47 57 6f |PS){...P|rintfGWo|
|00001af0| 72 6c 64 28 6f 75 72 29 | 3b 0d 09 09 67 65 74 73 |rld(our)|;...gets|
|00001b00| 28 73 74 72 69 6e 67 29 | 3b 0d 09 7d 0d 09 69 66 |(string)|;..}..if|
|00001b10| 28 30 29 7b 0d 09 09 44 | 69 73 70 6f 73 65 47 57 |(0){...D|isposeGW|
|00001b20| 6f 72 6c 64 28 6f 75 72 | 29 3b 0d 09 09 6f 75 72 |orld(our|);...our|
|00001b30| 3d 4e 55 4c 4c 3b 0d 09 | 7d 0d 7d 0d 0d 64 6f 75 |=NULL;..|}.}..dou|
|00001b40| 62 6c 65 20 53 74 72 4f | 75 74 6c 69 6e 65 4c 65 |ble StrO|utlineLe|
|00001b50| 6e 67 74 68 28 63 68 61 | 72 20 2a 73 29 0d 7b 0d |ngth(cha|r *s).{.|
|00001b60| 09 64 6f 75 62 6c 65 20 | 6c 65 6e 67 74 68 3b 0d |.double |length;.|
|00001b70| 0d 09 6c 65 6e 67 74 68 | 3d 53 74 72 69 6e 67 4f |..length|=StringO|
|00001b80| 75 74 6c 69 6e 65 4c 65 | 6e 67 74 68 28 63 32 70 |utlineLe|ngth(c2p|
|00001b90| 73 74 72 28 73 29 29 3b | 0d 09 70 32 63 73 74 72 |str(s));|..p2cstr|
|00001ba0| 28 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |((unsign|ed char |
|00001bb0| 2a 29 73 29 3b 0d 09 72 | 65 74 75 72 6e 20 6c 65 |*)s);..r|eturn le|
|00001bc0| 6e 67 74 68 3b 0d 7d 0d | 0d 2f 2f 23 75 6e 64 65 |ngth;.}.|.//#unde|
|00001bd0| 66 20 53 48 4f 57 5f 42 | 49 54 4d 41 50 53 0d 2f |f SHOW_B|ITMAPS./|
|00001be0| 2f 23 64 65 66 69 6e 65 | 20 53 48 4f 57 5f 42 49 |/#define| SHOW_BI|
|00001bf0| 54 4d 41 50 53 20 31 0d | 0d 64 6f 75 62 6c 65 20 |TMAPS 1.|.double |
|00001c00| 53 74 72 69 6e 67 4f 75 | 74 6c 69 6e 65 4c 65 6e |StringOu|tlineLen|
|00001c10| 67 74 68 28 63 6f 6e 73 | 74 20 75 6e 73 69 67 6e |gth(cons|t unsign|
|00001c20| 65 64 20 63 68 61 72 20 | 2a 73 29 0d 7b 0d 09 73 |ed char |*s).{..s|
|00001c30| 74 61 74 69 63 20 47 57 | 6f 72 6c 64 50 74 72 20 |tatic GW|orldPtr |
|00001c40| 77 6f 72 6c 64 3d 4e 55 | 4c 4c 3b 0d 09 47 57 6f |world=NU|LL;..GWo|
|00001c50| 72 6c 64 50 74 72 20 6f | 6c 64 3b 0d 09 47 44 48 |rldPtr o|ld;..GDH|
|00001c60| 61 6e 64 6c 65 20 6f 6c | 64 44 65 76 69 63 65 3b |andle ol|dDevice;|
|00001c70| 0d 09 46 6f 6e 74 49 6e | 66 6f 20 66 3b 0d 20 20 |..FontIn|fo f;. |
|00001c80| 20 20 52 65 63 74 20 72 | 2c 72 53 72 63 2c 72 44 | Rect r|,rSrc,rD|
|00001c90| 73 74 2c 72 53 6d 61 6c | 6c 3b 0d 09 72 65 67 69 |st,rSmal|l;..regi|
|00001ca0| 73 74 65 72 20 75 6e 73 | 69 67 6e 65 64 20 6c 6f |ster uns|igned lo|
|00001cb0| 6e 67 20 2a 70 69 78 3b | 0d 09 72 65 67 69 73 74 |ng *pix;|..regist|
|00001cc0| 65 72 20 69 6e 74 20 78 | 2c 79 3b 0d 09 72 65 67 |er int x|,y;..reg|
|00001cd0| 69 73 74 65 72 20 6c 6f | 6e 67 20 69 6e 6b 41 72 |ister lo|ng inkAr|
|00001ce0| 65 61 3d 30 3b 0d 09 69 | 6e 74 20 6e 3b 0d 09 69 |ea=0;..i|nt n;..i|
|00001cf0| 6e 74 20 65 72 72 6f 72 | 3b 0d 09 63 68 61 72 20 |nt error|;..char |
|00001d00| 73 74 72 69 6e 67 5b 34 | 30 5d 3b 0d 0d 09 61 73 |string[4|0];...as|
|00001d10| 73 65 72 74 28 53 74 61 | 63 6b 53 70 61 63 65 28 |sert(Sta|ckSpace(|
|00001d20| 29 3e 34 30 30 30 29 3b | 0d 09 47 65 74 46 6f 6e |)>4000);|..GetFon|
|00001d30| 74 49 6e 66 6f 28 26 66 | 29 3b 0d 09 53 65 74 52 |tInfo(&f|);..SetR|
|00001d40| 65 63 74 28 26 72 53 6d | 61 6c 6c 2c 30 2c 2d 66 |ect(&rSm|all,0,-f|
|00001d50| 2e 61 73 63 65 6e 74 2c | 53 74 72 69 6e 67 57 69 |.ascent,|StringWi|
|00001d60| 64 74 68 28 73 29 2c 66 | 2e 64 65 73 63 65 6e 74 |dth(s),f|.descent|
|00001d70| 29 3b 09 2f 2f 20 6e 6f | 6d 69 6e 61 6c 20 73 69 |);.// no|minal si|
|00001d80| 7a 65 0d 09 49 6e 73 65 | 74 52 65 63 74 28 26 72 |ze..Inse|tRect(&r|
|00001d90| 53 6d 61 6c 6c 2c 2d 28 | 66 2e 77 69 64 4d 61 78 |Small,-(|f.widMax|
|00001da0| 2b 34 29 2c 2d 28 66 2e | 6c 65 61 64 69 6e 67 2b |+4),-(f.|leading+|
|00001db0| 34 29 29 3b 20 09 09 2f | 2f 20 61 64 64 20 6d 61 |4)); ../|/ add ma|
|00001dc0| 72 67 69 6e 0d 09 72 53 | 72 63 3d 72 53 6d 61 6c |rgin..rS|rc=rSmal|
|00001dd0| 6c 3b 0d 09 72 53 72 63 | 2e 74 6f 70 2a 3d 32 3b |l;..rSrc|.top*=2;|
|00001de0| 09 2f 2f 20 61 6c 6c 6f | 77 20 72 6f 6f 6d 20 66 |.// allo|w room f|
|00001df0| 6f 72 20 64 6f 75 62 6c | 65 2d 73 69 7a 65 20 74 |or doubl|e-size t|
|00001e00| 65 78 74 0d 09 72 53 72 | 63 2e 6c 65 66 74 2a 3d |ext..rSr|c.left*=|
|00001e10| 32 3b 0d 09 72 53 72 63 | 2e 62 6f 74 74 6f 6d 2a |2;..rSrc|.bottom*|
|00001e20| 3d 32 3b 0d 09 72 53 72 | 63 2e 72 69 67 68 74 2a |=2;..rSr|c.right*|
|00001e30| 3d 32 3b 0d 09 72 3d 72 | 53 72 63 3b 0d 09 72 2e |=2;..r=r|Src;..r.|
|00001e40| 72 69 67 68 74 2b 3d 72 | 2e 72 69 67 68 74 2d 72 |right+=r|.right-r|
|00001e50| 2e 6c 65 66 74 3b 09 2f | 2f 20 64 6f 75 62 6c 65 |.left;./|/ double|
|00001e60| 20 72 65 63 74 2c 20 74 | 6f 20 6d 61 6b 65 20 72 | rect, t|o make r|
|00001e70| 6f 6f 6d 20 66 6f 72 20 | 72 44 73 74 2e 0d 09 72 |oom for |rDst...r|
|00001e80| 44 73 74 3d 72 53 72 63 | 3b 0d 09 4f 66 66 73 65 |Dst=rSrc|;..Offse|
|00001e90| 74 52 65 63 74 28 26 72 | 44 73 74 2c 72 53 72 63 |tRect(&r|Dst,rSrc|
|00001ea0| 2e 72 69 67 68 74 2d 72 | 53 72 63 2e 6c 65 66 74 |.right-r|Src.left|
|00001eb0| 2c 30 29 3b 0d 09 49 6e | 73 65 74 52 65 63 74 28 |,0);..In|setRect(|
|00001ec0| 26 72 53 72 63 2c 31 2c | 31 29 3b 0d 09 49 6e 73 |&rSrc,1,|1);..Ins|
|00001ed0| 65 74 52 65 63 74 28 26 | 72 44 73 74 2c 31 2c 31 |etRect(&|rDst,1,1|
|00001ee0| 29 3b 0d 0d 09 2f 2f 20 | 64 72 61 77 20 73 74 72 |);...// |draw str|
|00001ef0| 69 6e 67 20 69 6e 74 6f | 20 61 20 6e 65 77 20 47 |ing into| a new G|
|00001f00| 57 6f 72 6c 64 0d 09 69 | 66 28 77 6f 72 6c 64 21 |World..i|f(world!|
|00001f10| 3d 4e 55 4c 4c 29 7b 0d | 09 09 44 69 73 70 6f 73 |=NULL){.|..Dispos|
|00001f20| 65 47 57 6f 72 6c 64 28 | 77 6f 72 6c 64 29 3b 0d |eGWorld(|world);.|
|00001f30| 09 09 77 6f 72 6c 64 3d | 4e 55 4c 4c 3b 0d 09 7d |..world=|NULL;..}|
|00001f40| 0d 09 69 66 28 77 6f 72 | 6c 64 3d 3d 4e 55 4c 4c |..if(wor|ld==NULL|
|00001f50| 29 7b 0d 09 09 65 72 72 | 6f 72 3d 4e 65 77 47 57 |){...err|or=NewGW|
|00001f60| 6f 72 6c 64 28 26 77 6f | 72 6c 64 2c 31 2c 26 72 |orld(&wo|rld,1,&r|
|00001f70| 2c 4e 55 4c 4c 2c 4e 55 | 4c 4c 2c 6b 65 65 70 4c |,NULL,NU|LL,keepL|
|00001f80| 6f 63 61 6c 7c 75 73 65 | 54 65 6d 70 4d 65 6d 29 |ocal|use|TempMem)|
|00001f90| 3b 0d 09 09 69 66 28 65 | 72 72 6f 72 29 65 72 72 |;...if(e|rror)err|
|00001fa0| 6f 72 3d 4e 65 77 47 57 | 6f 72 6c 64 28 26 77 6f |or=NewGW|orld(&wo|
|00001fb0| 72 6c 64 2c 31 2c 26 72 | 2c 4e 55 4c 4c 2c 4e 55 |rld,1,&r|,NULL,NU|
|00001fc0| 4c 4c 2c 6b 65 65 70 4c | 6f 63 61 6c 29 3b 0d 09 |LL,keepL|ocal);..|
|00001fd0| 7d 65 6c 73 65 7b 0d 09 | 09 65 72 72 6f 72 3d 55 |}else{..|.error=U|
|00001fe0| 70 64 61 74 65 47 57 6f | 72 6c 64 28 26 77 6f 72 |pdateGWo|rld(&wor|
|00001ff0| 6c 64 2c 31 2c 26 72 2c | 4e 55 4c 4c 2c 4e 55 4c |ld,1,&r,|NULL,NUL|
|00002000| 4c 2c 63 6c 69 70 50 69 | 78 29 3b 0d 09 09 61 73 |L,clipPi|x);...as|
|00002010| 73 65 72 74 28 45 71 75 | 61 6c 52 65 63 74 28 26 |sert(Equ|alRect(&|
|00002020| 72 2c 26 77 6f 72 6c 64 | 2d 3e 70 6f 72 74 52 65 |r,&world|->portRe|
|00002030| 63 74 29 29 3b 0d 09 09 | 61 73 73 65 72 74 28 28 |ct));...|assert((|
|00002040| 2a 2a 77 6f 72 6c 64 2d | 3e 63 6c 69 70 52 67 6e |**world-|>clipRgn|
|00002050| 29 2e 72 67 6e 53 69 7a | 65 3d 3d 31 30 29 3b 0d |).rgnSiz|e==10);.|
|00002060| 09 09 28 2a 2a 77 6f 72 | 6c 64 2d 3e 63 6c 69 70 |..(**wor|ld->clip|
|00002070| 52 67 6e 29 2e 72 67 6e | 42 42 6f 78 3d 77 6f 72 |Rgn).rgn|BBox=wor|
|00002080| 6c 64 2d 3e 70 6f 72 74 | 52 65 63 74 3b 0d 09 7d |ld->port|Rect;..}|
|00002090| 0d 09 69 66 28 65 72 72 | 6f 72 29 50 72 69 6e 74 |..if(err|or)Print|
|000020a0| 66 45 78 69 74 28 22 53 | 74 72 69 6e 67 4f 75 74 |fExit("S|tringOut|
|000020b0| 6c 69 6e 65 4c 65 6e 67 | 74 68 3a 20 4e 65 77 47 |lineLeng|th: NewG|
|000020c0| 57 6f 72 6c 64 2f 55 70 | 64 61 74 65 47 57 6f 72 |World/Up|dateGWor|
|000020d0| 6c 64 20 65 72 72 6f 72 | 20 25 64 2e 5c 6e 22 2c |ld error| %d.\n",|
|000020e0| 65 72 72 6f 72 29 3b 0d | 09 47 65 74 47 57 6f 72 |error);.|.GetGWor|
|000020f0| 6c 64 28 26 6f 6c 64 2c | 26 6f 6c 64 44 65 76 69 |ld(&old,|&oldDevi|
|00002100| 63 65 29 3b 0d 09 53 65 | 74 47 57 6f 72 6c 64 28 |ce);..Se|tGWorld(|
|00002110| 77 6f 72 6c 64 2c 4e 55 | 4c 4c 29 3b 0d 09 54 65 |world,NU|LL);..Te|
|00002120| 78 74 46 61 63 65 28 6f | 6c 64 2d 3e 74 78 46 61 |xtFace(o|ld->txFa|
|00002130| 63 65 29 3b 0d 09 54 65 | 78 74 46 6f 6e 74 28 6f |ce);..Te|xtFont(o|
|00002140| 6c 64 2d 3e 74 78 46 6f | 6e 74 29 3b 0d 09 54 65 |ld->txFo|nt);..Te|
|00002150| 78 74 53 69 7a 65 28 6f | 6c 64 2d 3e 74 78 53 69 |xtSize(o|ld->txSi|
|00002160| 7a 65 29 3b 0d 09 45 72 | 61 73 65 52 65 63 74 28 |ze);..Er|aseRect(|
|00002170| 26 77 6f 72 6c 64 2d 3e | 70 6f 72 74 52 65 63 74 |&world->|portRect|
|00002180| 29 3b 0d 09 4d 6f 76 65 | 54 6f 28 30 2c 30 29 3b |);..Move|To(0,0);|
|00002190| 0d 09 44 72 61 77 53 74 | 72 69 6e 67 28 73 29 3b |..DrawSt|ring(s);|
|000021a0| 0d 09 53 65 74 47 57 6f | 72 6c 64 28 6f 6c 64 2c |..SetGWo|rld(old,|
|000021b0| 6f 6c 64 44 65 76 69 63 | 65 29 3b 0d 0d 09 2f 2f |oldDevic|e);...//|
|000021c0| 20 45 78 70 61 6e 64 20 | 74 65 78 74 20 73 6f 20 | Expand |text so |
|000021d0| 74 68 61 74 20 61 6c 6c | 20 66 65 61 74 75 72 65 |that all| feature|
|000021e0| 73 20 61 72 65 20 61 74 | 20 6c 65 61 73 74 20 32 |s are at| least 2|
|000021f0| 20 70 69 78 65 6c 73 20 | 74 68 69 63 6b 0d 09 65 | pixels |thick..e|
|00002200| 72 72 6f 72 3d 43 6f 70 | 79 57 69 6e 64 6f 77 73 |rror=Cop|yWindows|
|00002210| 28 77 6f 72 6c 64 2c 77 | 6f 72 6c 64 2c 26 72 53 |(world,w|orld,&rS|
|00002220| 6d 61 6c 6c 2c 26 72 44 | 73 74 2c 73 72 63 43 6f |mall,&rD|st,srcCo|
|00002230| 70 79 2c 4e 55 4c 4c 29 | 3b 0d 09 65 72 72 6f 72 |py,NULL)|;..error|
|00002240| 3d 43 6f 70 79 57 69 6e | 64 6f 77 73 28 77 6f 72 |=CopyWin|dows(wor|
|00002250| 6c 64 2c 77 6f 72 6c 64 | 2c 26 72 44 73 74 2c 26 |ld,world|,&rDst,&|
|00002260| 72 53 72 63 2c 73 72 63 | 43 6f 70 79 2c 4e 55 4c |rSrc,src|Copy,NUL|
|00002270| 4c 29 3b 0d 0d 09 2f 2f | 20 47 72 6f 77 20 65 61 |L);...//| Grow ea|
|00002280| 63 68 20 62 6c 61 63 6b | 20 70 69 78 65 6c 20 69 |ch black| pixel i|
|00002290| 6e 74 6f 20 61 20 33 78 | 33 20 73 71 75 61 72 65 |nto a 3x|3 square|
|000022a0| 2e 0d 09 72 3d 72 44 73 | 74 3b 0d 09 4f 66 66 73 |...r=rDs|t;..Offs|
|000022b0| 65 74 52 65 63 74 28 26 | 72 2c 30 2c 31 29 3b 0d |etRect(&|r,0,1);.|
|000022c0| 09 65 72 72 6f 72 3d 43 | 6f 70 79 57 69 6e 64 6f |.error=C|opyWindo|
|000022d0| 77 73 28 77 6f 72 6c 64 | 2c 77 6f 72 6c 64 2c 26 |ws(world|,world,&|
|000022e0| 72 53 72 63 2c 26 72 2c | 73 72 63 4f 72 2c 4e 55 |rSrc,&r,|srcOr,NU|
|000022f0| 4c 4c 29 3b 0d 09 4f 66 | 66 73 65 74 52 65 63 74 |LL);..Of|fsetRect|
|00002300| 28 26 72 2c 30 2c 2d 32 | 29 3b 0d 09 65 72 72 6f |(&r,0,-2|);..erro|
|00002310| 72 3d 43 6f 70 79 57 69 | 6e 64 6f 77 73 28 77 6f |r=CopyWi|ndows(wo|
|00002320| 72 6c 64 2c 77 6f 72 6c | 64 2c 26 72 53 72 63 2c |rld,worl|d,&rSrc,|
|00002330| 26 72 2c 73 72 63 4f 72 | 2c 4e 55 4c 4c 29 3b 0d |&r,srcOr|,NULL);.|
|00002340| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 72 2c 31 |.OffsetR|ect(&r,1|
|00002350| 2c 31 29 3b 0d 09 65 72 | 72 6f 72 3d 43 6f 70 79 |,1);..er|ror=Copy|
|00002360| 57 69 6e 64 6f 77 73 28 | 77 6f 72 6c 64 2c 77 6f |Windows(|world,wo|
|00002370| 72 6c 64 2c 26 72 44 73 | 74 2c 26 72 2c 73 72 63 |rld,&rDs|t,&r,src|
|00002380| 4f 72 2c 4e 55 4c 4c 29 | 3b 0d 09 4f 66 66 73 65 |Or,NULL)|;..Offse|
|00002390| 74 52 65 63 74 28 26 72 | 2c 2d 32 2c 30 29 3b 0d |tRect(&r|,-2,0);.|
|000023a0| 09 65 72 72 6f 72 3d 43 | 6f 70 79 57 69 6e 64 6f |.error=C|opyWindo|
|000023b0| 77 73 28 77 6f 72 6c 64 | 2c 77 6f 72 6c 64 2c 26 |ws(world|,world,&|
|000023c0| 72 44 73 74 2c 26 72 2c | 73 72 63 4f 72 2c 4e 55 |rDst,&r,|srcOr,NU|
|000023d0| 4c 4c 29 3b 0d 0d 09 2f | 2f 20 43 6c 65 61 72 20 |LL);.../|/ Clear |
|000023e0| 74 68 65 20 70 69 78 65 | 6c 73 20 63 6f 72 72 65 |the pixe|ls corre|
|000023f0| 73 70 6f 6e 64 69 6e 67 | 20 74 6f 20 74 68 65 20 |sponding| to the |
|00002400| 6f 72 69 67 69 6e 61 6c | 20 69 6d 61 67 65 2c 20 |original| image, |
|00002410| 6c 65 61 76 69 6e 67 20 | 61 20 31 20 70 69 78 65 |leaving |a 1 pixe|
|00002420| 6c 20 6f 75 74 6c 69 6e | 65 2e 0d 09 65 72 72 6f |l outlin|e...erro|
|00002430| 72 3d 43 6f 70 79 57 69 | 6e 64 6f 77 73 28 77 6f |r=CopyWi|ndows(wo|
|00002440| 72 6c 64 2c 77 6f 72 6c | 64 2c 26 72 53 72 63 2c |rld,worl|d,&rSrc,|
|00002450| 26 72 44 73 74 2c 73 72 | 63 42 69 63 2c 4e 55 4c |&rDst,sr|cBic,NUL|
|00002460| 4c 29 3b 0d 09 65 72 72 | 6f 72 3d 43 6f 70 79 57 |L);..err|or=CopyW|
|00002470| 69 6e 64 6f 77 73 28 77 | 6f 72 6c 64 2c 77 6f 72 |indows(w|orld,wor|
|00002480| 6c 64 2c 26 72 44 73 74 | 2c 26 72 53 72 63 2c 73 |ld,&rDst|,&rSrc,s|
|00002490| 72 63 43 6f 70 79 2c 4e | 55 4c 4c 29 3b 0d 0d 09 |rcCopy,N|ULL);...|
|000024a0| 2f 2f 20 47 72 6f 77 20 | 65 61 63 68 20 62 6c 61 |// Grow |each bla|
|000024b0| 63 6b 20 70 69 78 65 6c | 2c 20 73 6f 20 74 68 61 |ck pixel|, so tha|
|000024c0| 74 20 6c 69 6e 65 73 20 | 6f 66 20 61 6c 6c 20 6f |t lines |of all o|
|000024d0| 72 69 65 6e 74 61 74 69 | 6f 6e 73 20 61 72 65 20 |rientati|ons are |
|000024e0| 65 66 66 65 63 74 69 76 | 65 6c 79 20 33 20 70 69 |effectiv|ely 3 pi|
|000024f0| 78 65 6c 73 20 74 68 69 | 63 6b 2e 0d 09 72 3d 72 |xels thi|ck...r=r|
|00002500| 44 73 74 3b 0d 09 4f 66 | 66 73 65 74 52 65 63 74 |Dst;..Of|fsetRect|
|00002510| 28 26 72 2c 30 2c 31 29 | 3b 0d 09 65 72 72 6f 72 |(&r,0,1)|;..error|
|00002520| 3d 43 6f 70 79 57 69 6e | 64 6f 77 73 28 77 6f 72 |=CopyWin|dows(wor|
|00002530| 6c 64 2c 77 6f 72 6c 64 | 2c 26 72 53 72 63 2c 26 |ld,world|,&rSrc,&|
|00002540| 72 2c 73 72 63 4f 72 2c | 4e 55 4c 4c 29 3b 0d 09 |r,srcOr,|NULL);..|
|00002550| 4f 66 66 73 65 74 52 65 | 63 74 28 26 72 2c 30 2c |OffsetRe|ct(&r,0,|
|00002560| 2d 32 29 3b 0d 09 65 72 | 72 6f 72 3d 43 6f 70 79 |-2);..er|ror=Copy|
|00002570| 57 69 6e 64 6f 77 73 28 | 77 6f 72 6c 64 2c 77 6f |Windows(|world,wo|
|00002580| 72 6c 64 2c 26 72 53 72 | 63 2c 26 72 2c 73 72 63 |rld,&rSr|c,&r,src|
|00002590| 4f 72 2c 4e 55 4c 4c 29 | 3b 0d 09 4f 66 66 73 65 |Or,NULL)|;..Offse|
|000025a0| 74 52 65 63 74 28 26 72 | 2c 31 2c 31 29 3b 0d 09 |tRect(&r|,1,1);..|
|000025b0| 65 72 72 6f 72 3d 43 6f | 70 79 57 69 6e 64 6f 77 |error=Co|pyWindow|
|000025c0| 73 28 77 6f 72 6c 64 2c | 77 6f 72 6c 64 2c 26 72 |s(world,|world,&r|
|000025d0| 53 72 63 2c 26 72 2c 73 | 72 63 4f 72 2c 4e 55 4c |Src,&r,s|rcOr,NUL|
|000025e0| 4c 29 3b 0d 09 4f 66 66 | 73 65 74 52 65 63 74 28 |L);..Off|setRect(|
|000025f0| 26 72 2c 2d 32 2c 30 29 | 3b 0d 09 65 72 72 6f 72 |&r,-2,0)|;..error|
|00002600| 3d 43 6f 70 79 57 69 6e | 64 6f 77 73 28 77 6f 72 |=CopyWin|dows(wor|
|00002610| 6c 64 2c 77 6f 72 6c 64 | 2c 26 72 53 72 63 2c 26 |ld,world|,&rSrc,&|
|00002620| 72 2c 73 72 63 4f 72 2c | 4e 55 4c 4c 29 3b 0d 0d |r,srcOr,|NULL);..|
|00002630| 09 2f 2f 20 63 6f 75 6e | 74 20 74 68 65 20 62 6c |.// coun|t the bl|
|00002640| 61 63 6b 20 70 69 78 65 | 6c 73 0d 09 72 3d 72 44 |ack pixe|ls..r=rD|
|00002650| 73 74 3b 0d 09 6e 3d 72 | 2e 72 69 67 68 74 2d 72 |st;..n=r|.right-r|
|00002660| 2e 6c 65 66 74 3b 0d 09 | 70 69 78 3d 28 75 6e 73 |.left;..|pix=(uns|
|00002670| 69 67 6e 65 64 20 6c 6f | 6e 67 20 2a 29 4e 65 77 |igned lo|ng *)New|
|00002680| 50 74 72 28 6e 2a 73 69 | 7a 65 6f 66 28 2a 70 69 |Ptr(n*si|zeof(*pi|
|00002690| 78 29 29 3b 0d 09 69 66 | 28 70 69 78 3d 3d 4e 55 |x));..if|(pix==NU|
|000026a0| 4c 4c 29 50 72 69 6e 74 | 66 45 78 69 74 28 22 25 |LL)Print|fExit("%|
|000026b0| 73 20 6c 69 6e 65 20 25 | 64 3a 20 43 6f 75 6c 64 |s line %|d: Could|
|000026c0| 6e 27 74 20 61 6c 6c 6f | 63 61 74 65 20 25 6c 64 |n't allo|cate %ld|
|000026d0| 20 62 79 74 65 73 2e 5c | 6e 22 0d 09 09 2c 5f 5f | bytes.\|n"...,__|
|000026e0| 46 49 4c 45 5f 5f 2c 5f | 5f 4c 49 4e 45 5f 5f 2c |FILE__,_|_LINE__,|
|000026f0| 6e 2a 73 69 7a 65 6f 66 | 28 6c 6f 6e 67 29 29 3b |n*sizeof|(long));|
|00002700| 0d 09 53 65 74 47 57 6f | 72 6c 64 28 77 6f 72 6c |..SetGWo|rld(worl|
|00002710| 64 2c 4e 55 4c 4c 29 3b | 0d 09 66 6f 72 28 79 3d |d,NULL);|..for(y=|
|00002720| 30 3b 79 3c 72 2e 62 6f | 74 74 6f 6d 2d 72 2e 74 |0;y<r.bo|ttom-r.t|
|00002730| 6f 70 3b 79 2b 2b 29 7b | 0d 09 09 47 65 74 50 69 |op;y++){|...GetPi|
|00002740| 78 65 6c 73 51 75 69 63 | 6b 6c 79 28 72 2e 6c 65 |xelsQuic|kly(r.le|
|00002750| 66 74 2c 72 2e 74 6f 70 | 2b 79 2c 70 69 78 2c 6e |ft,r.top|+y,pix,n|
|00002760| 29 3b 0d 09 09 66 6f 72 | 28 78 3d 6e 2d 31 3b 78 |);...for|(x=n-1;x|
|00002770| 3e 3d 30 3b 78 2d 2d 29 | 69 66 28 70 69 78 5b 78 |>=0;x--)|if(pix[x|
|00002780| 5d 21 3d 30 29 7b 0d 09 | 09 09 69 6e 6b 41 72 65 |]!=0){..|..inkAre|
|00002790| 61 2b 2b 3b 0d 09 09 7d | 0d 09 7d 0d 09 69 66 28 |a++;...}|..}..if(|
|000027a0| 53 48 4f 57 5f 42 49 54 | 4d 41 50 53 29 7b 0d 09 |SHOW_BIT|MAPS){..|
|000027b0| 09 50 72 69 6e 74 66 47 | 57 6f 72 6c 64 28 77 6f |.PrintfG|World(wo|
|000027c0| 72 6c 64 29 3b 0d 09 09 | 67 65 74 73 28 73 74 72 |rld);...|gets(str|
|000027d0| 69 6e 67 29 3b 0d 09 7d | 0d 09 53 65 74 47 57 6f |ing);..}|..SetGWo|
|000027e0| 72 6c 64 28 6f 6c 64 2c | 6f 6c 64 44 65 76 69 63 |rld(old,|oldDevic|
|000027f0| 65 29 3b 0d 09 44 69 73 | 70 6f 73 65 50 74 72 28 |e);..Dis|posePtr(|
|00002800| 28 76 6f 69 64 20 2a 29 | 70 69 78 29 3b 09 0d 09 |(void *)|pix);...|
|00002810| 69 66 28 30 29 7b 0d 09 | 09 44 69 73 70 6f 73 65 |if(0){..|.Dispose|
|00002820| 47 57 6f 72 6c 64 28 77 | 6f 72 6c 64 29 3b 0d 09 |GWorld(w|orld);..|
|00002830| 09 77 6f 72 6c 64 3d 4e | 55 4c 4c 3b 0d 09 7d 0d |.world=N|ULL;..}.|
|00002840| 09 72 65 74 75 72 6e 20 | 69 6e 6b 41 72 65 61 2f |.return |inkArea/|
|00002850| 36 2e 30 3b 0d 7d 0d 00 | 00 00 00 00 00 00 00 00 |6.0;.}..|........|
|00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002880| 00 00 01 00 00 00 06 62 | 00 00 05 62 00 00 00 aa |.......b|...b....|
|00002890| 00 00 2d c4 00 54 03 00 | 00 00 00 00 00 00 00 00 |..-..T..|........|
|000028a0| 00 00 01 b4 0b 54 72 61 | 6e 73 6c 61 74 6f 72 73 |.....Tra|nslators|
|000028b0| 0e 53 74 72 69 6e 67 42 | 6f 75 6e 64 73 2e 63 75 |.StringB|ounds.cu|
|000028c0| 02 00 00 00 54 45 58 54 | 43 57 49 45 01 00 00 3c |....TEXT|CWIE...<|
|000028d0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 3c 05 a0 |..TEXTCW|IE...<..|
|000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028f0| 00 00 a9 60 79 26 00 00 | 27 d7 00 00 07 0c a7 fa |...`y&..|'.......|
|00002900| e0 c2 a8 08 1b cc 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002920| 00 00 00 00 00 00 00 00 | 1d 63 00 03 00 00 00 00 |........|.c......|
|00002930| 00 00 00 00 00 00 00 00 | 13 00 00 00 2d c4 0d 20 |........|....-.. |
|00002940| 2e 6f 20 43 6f 6e 76 65 | 72 74 65 72 02 00 00 00 |.o Conve|rter....|
|00002950| 54 52 41 4e 6f 43 6e 76 | 20 00 00 00 00 00 00 00 |TRANoCnv| .......|
|00002960| 00 00 2d f7 00 00 00 00 | 00 00 00 00 00 00 00 00 |..-.....|........|
|00002970| 00 00 9d 0e 00 00 a2 00 | a8 08 18 5b a8 08 18 ed |........|...[....|
|00002980| 00 00 00 1e 00 00 0e d6 | 00 74 00 36 07 98 00 00 |........|.t.6....|
|00002990| 10 33 00 83 00 00 00 00 | 00 00 0e 8c 00 72 00 00 |.3......|.....r..|
|000029a0| 00 00 00 00 01 d4 00 12 | 00 10 00 00 0a 04 00 4b |........|.......K|
|000029b0| 00 36 0b ac 10 80 01 73 | 00 2c 00 00 0c 39 00 5c |.6.....s|.,...9.\|
|000029c0| 00 36 0b 9c 80 00 00 82 | 01 b4 01 2b 02 7c 94 20 |.6......|...+.|. |
|000029d0| 00 00 00 00 00 00 0d 28 | 2a 6f 75 72 29 2e 70 6e |.......(|*our).pn|
|000029e0| 4c 6f 63 20 00 2c 00 00 | 0c 39 00 5c 00 36 0b 2c |Loc .,..|.9.\.6.,|
|000029f0| 80 00 00 be 01 b4 01 67 | 02 7c 94 20 00 00 00 00 |.......g|.|. ....|
|00002a00| 00 00 0d 28 2a 6f 75 72 | 29 2e 70 6e 4c 6f 63 20 |...(*our|).pnLoc |
|00002a10| 00 24 00 00 0c 39 00 5c | 00 36 0a c8 80 00 00 2a |.$...9.\|.6.....*|
|00002a20| 01 c7 01 78 02 7a 94 20 | 00 00 00 00 00 00 05 2a |...x.z. |.......*|
|00002a30| 6f 75 72 20 00 12 00 00 | 0c 39 00 5c 00 36 09 dc |our ....|.9.\.6..|
|00002a40| 00 00 03 6f 75 72 00 26 | 00 00 0d 73 00 6b 00 36 |...our.&|...s.k.6|
|00002a50| 09 cc 80 00 00 2a 00 0a | 00 91 00 8a 94 20 00 00 |.....*..|..... ..|
|00002a60| 00 00 00 00 07 2a 62 6f | 75 6e 64 73 00 16 00 00 |.....*bo|unds....|
|00002a70| 0d 73 00 6b 00 36 09 60 | 00 00 07 62 6f 75 6e 64 |.s.k.6.`|...bound|
|00002a80| 73 20 00 2a 00 00 0d 73 | 00 6b 00 36 09 44 80 00 |s .*...s|.k.6.D..|
|00002a90| 00 29 00 97 00 90 01 0f | 94 20 00 00 00 00 00 00 |.)......|. ......|
|00002aa0| 0b 77 6f 72 6c 64 42 6f | 75 6e 64 73 00 20 00 00 |.worldBo|unds. ..|
|00002ab0| 0a 32 00 4d 00 36 08 d8 | 80 00 00 29 01 1f 00 90 |.2.M.6..|...)....|
|00002ac0| 01 b6 94 20 00 00 00 00 | 00 00 01 66 00 14 00 00 |... ....|...f....|
|00002ad0| 10 33 00 83 00 36 08 6c | 00 00 05 62 6c 61 6e 6b |.3...6.l|...blank|
|00002ae0| 00 20 00 00 0e ac 00 73 | 00 36 08 5c 00 00 11 77 |. .....s|.6.\...w|
|00002af0| 6f 72 6c 64 42 6f 75 6e | 64 73 2e 6c 65 66 74 20 |orldBoun|ds.left |
|00002b00| 00 14 00 00 0e ac 00 73 | 00 36 08 40 00 00 05 2a |.......s|.6.@...*|
|00002b10| 70 69 78 20 00 12 00 00 | 0e ac 00 73 00 36 08 30 |pix ....|...s.6.0|
|00002b20| 00 00 03 70 69 78 00 10 | 00 00 0d a4 00 6c 00 36 |...pix..|.....l.6|
|00002b30| 07 9c 00 00 01 6e 00 10 | 00 00 0e d6 00 74 00 36 |.....n..|.....t.6|
|00002b40| 07 cc 00 00 01 79 00 14 | 00 00 0e d6 00 74 00 36 |.....y..|.....t.6|
|00002b50| 07 98 00 00 05 79 3d 3d | 30 20 00 10 00 00 0e d6 |.....y==|0 ......|
|00002b60| 00 74 00 36 07 c8 00 00 | 01 69 00 10 00 00 0f 06 |.t.6....|.i......|
|00002b70| 00 76 00 36 07 28 00 00 | 01 78 00 00 00 0a 00 00 |.v.6.(..|.x......|
|00002b80| 10 18 00 82 00 00 00 00 | 00 00 02 2a 00 14 00 10 |........|...*....|
|00002b90| 00 00 09 b5 00 45 00 9e | 08 f8 10 80 01 73 00 2a |.....E..|.....s.*|
|00002ba0| 00 00 09 b5 00 45 00 9e | 09 20 80 00 00 65 01 63 |.....E..|. ...e.c|
|00002bb0| 01 0e 02 7c 94 20 00 00 | 00 00 00 00 0b 2a 62 6f |...|. ..|.....*bo|
|00002bc0| 75 6e 64 73 50 74 72 20 | 00 18 00 00 09 b5 00 45 |undsPtr |.......E|
|00002bd0| 00 9e 08 98 00 00 09 62 | 6f 75 6e 64 73 50 74 72 |.......b|oundsPtr|
|00002be0| 00 20 00 00 0a 32 00 4d | 00 9e 08 7c 80 00 00 44 |. ...2.M|...|...D|
|00002bf0| 01 39 00 ab 01 d6 94 20 | 00 00 00 00 00 00 01 72 |.9..... |.......r|
|00002c00| 00 26 00 00 0d 73 00 6b | 00 9e 08 10 80 00 01 05 |.&...s.k|........|
|00002c10| 01 df 01 6c 02 72 94 20 | 00 00 00 00 00 00 07 62 |...l.r. |.......b|
|00002c20| 6f 75 6e 64 73 20 00 14 | 00 00 0e d6 00 74 00 9e |ounds ..|.....t..|
|00002c30| 07 a4 00 00 05 62 6c 61 | 6e 6b 00 10 00 00 0e d6 |.....bla|nk......|
|00002c40| 00 74 00 9e 07 94 00 00 | 01 78 00 10 00 00 0e 8c |.t......|.x......|
|00002c50| 00 72 00 9e 07 84 00 00 | 01 79 00 2e 00 00 0b 99 |.r......|.y......|
|00002c60| 00 59 00 9e 07 68 80 00 | 00 bc 01 3f 01 23 01 e2 |.Y...h..|...?.#..|
|00002c70| 94 20 00 00 00 00 00 00 | 0f 28 2a 6f 75 72 29 2e |. ......|.(*our).|
|00002c80| 70 6f 72 74 52 65 63 74 | 00 22 00 00 0b 99 00 59 |portRect|.".....Y|
|00002c90| 00 9e 06 fc 00 00 13 28 | 2a 6f 75 72 20 29 2e 72 |.......(|*our ).r|
|00002ca0| 67 62 42 6b 43 6f 6c 6f | 72 20 00 32 00 00 0b 99 |gbBkColo|r .2....|
|00002cb0| 00 59 00 9e 06 ec 80 00 | 00 c9 01 95 01 72 02 6e |.Y......|.....r.n|
|00002cc0| 94 20 00 00 00 00 00 00 | 13 28 2a 6f 75 72 20 29 |. ......|.(*our )|
|00002cd0| 2e 72 67 62 46 67 43 6f | 6c 6f 72 20 00 22 00 00 |.rgbFgCo|lor ."..|
|00002ce0| 0b 99 00 59 00 9e 06 84 | 00 00 13 28 2a 6f 75 72 |...Y....|...(*our|
|00002cf0| 20 29 2e 72 67 62 46 67 | 43 6f 6c 6f 72 20 00 22 | ).rgbFg|Color ."|
|00002d00| 00 00 0b 99 00 59 00 9e | 06 74 00 00 13 28 2a 6f |.....Y..|.t...(*o|
|00002d10| 75 72 20 29 2e 72 67 62 | 42 6b 43 6f 6c 6f 72 20 |ur ).rgb|BkColor |
|00002d20| 00 24 00 00 0b 99 00 59 | 00 9e 06 58 80 00 00 a1 |.$.....Y|...X....|
|00002d30| 01 8d 01 4a 02 66 94 20 | 00 00 00 01 00 00 05 2a |...J.f. |.......*|
|00002d40| 6f 75 72 20 00 12 00 00 | 0b 99 00 59 00 9e 05 7c |our ....|...Y...||
|00002d50| 00 00 03 6f 75 72 00 10 | 00 00 0b 99 00 59 00 9e |...our..|.....Y..|
|00002d60| 05 6c 00 00 01 72 00 1a | 00 00 0c 4f 00 5d 00 9e |.l...r..|...O.]..|
|00002d70| 05 50 00 00 0b 6f 6c 64 | 2d 3e 74 78 46 61 63 65 |.P...old|->txFace|
|00002d80| 00 10 00 00 0d a4 00 6c | 00 9e 05 40 00 00 01 6e |.......l|...@...n|
|00002d90| 00 12 00 00 0c 97 00 60 | 00 9e 05 30 00 00 03 6f |.......`|...0...o|
|00002da0| 75 72 00 14 00 00 0e d6 | 00 74 00 9e 05 20 00 00 |ur......|.t... ..|
|00002db0| 05 62 6c 61 6e 6b 00 00 | 00 70 00 04 00 1c 00 00 |.blank..|.p......|
|00002dc0| 0a 04 00 4b 00 d3 6a f0 | 00 00 0d 53 74 61 63 6b |...K..j.|...Stack|
|00002dd0| 53 70 61 63 65 28 29 20 | 00 2c 00 00 0c 97 00 60 |Space() |.,.....`|
|00002de0| 00 d3 6a f8 80 00 00 69 | 02 83 01 49 03 9c 94 20 |..j....i|...I... |
|00002df0| 00 00 00 00 00 00 0d 6f | 75 72 2d 3e 70 6f 72 74 |.......o|ur->port|
|00002e00| 52 65 63 74 00 16 00 00 | 0c ff 00 65 00 d3 6a 6c |Rect....|...e..jl|
|00002e10| 00 00 07 73 74 72 69 6e | 67 20 00 10 00 00 0a d5 |...strin|g ......|
|00002e20| 00 51 00 d3 6a 5c 10 80 | 01 73 00 00 00 1e 00 2a |.Q..j\..|.s.....*|
|00002e30| 00 03 01 d1 01 ff 00 2a | 00 03 01 6b 01 3a 00 00 |.......*|...k.:..|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 3e |........|.......>|
|00002e50| 00 03 00 00 07 fe 00 00 | 08 08 0b 43 68 61 72 42 |........|...CharB|
|00002e60| 6f 75 6e 64 73 00 00 00 | 08 93 00 00 08 9c 09 53 |ounds...|.......S|
|00002e70| 74 72 42 6f 75 6e 64 73 | 00 00 09 19 00 00 09 25 |trBounds|.......%|
|00002e80| 0d 53 74 72 69 6e 67 42 | 6f 75 6e 64 73 00 00 00 |.StringB|ounds...|
|00002e90| 00 48 00 09 4d 6f 6e 61 | 63 6f 00 00 00 00 00 00 |.H..Mona|co......|
|00002ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002eb0| 00 00 00 00 00 03 00 04 | 00 57 00 04 01 f5 02 7c |........|.W.....||
|00002ec0| 00 57 00 04 01 f5 02 7c | ac be a4 97 00 00 00 c9 |.W.....||........|
|00002ed0| 00 00 01 00 00 00 19 c4 | 00 00 00 00 00 04 00 01 |........|........|
|00002ee0| 00 01 00 00 01 00 00 00 | 06 62 00 00 05 62 00 00 |........|.b...b..|
|00002ef0| 00 aa 01 5d 79 c0 3a 64 | 00 00 00 1c 00 aa 00 03 |...]y.:d|........|
|00002f00| 42 4b 50 54 00 01 00 22 | 44 54 56 55 00 02 00 3a |BKPT..."|DTVU...:|
|00002f10| 4d 50 53 52 00 02 00 5e | 4d 57 42 42 00 00 00 82 |MPSR...^|MWBB....|
|00002f20| 4a cb ff ff 00 00 00 00 | 00 00 00 00 4b 7b ff ff |J.......|....K{..|
|00002f30| 00 00 01 fa 00 00 00 00 | 44 15 ff ff 00 00 00 22 |........|D......"|
|00002f40| 00 00 00 00 1a 0e ff ff | 00 00 02 08 00 00 00 00 |........|........|
|00002f50| 75 23 ff ff 00 00 04 36 | 00 00 00 00 03 f0 ff ff |u#.....6|........|
|00002f60| 00 00 04 aa 00 00 00 00 | 03 ef ff ff 00 00 04 cc |........|........|
|00002f70| 00 00 00 00 03 ed ff ff | 00 00 05 0e 00 00 00 00 |........|........|
|00002f80| 03 f0 ff ff 00 00 05 5a | 00 00 00 00 00 00 00 00 |.......Z|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+