home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pytexdoc / ext / lib / libr / drawf / tex
LaTeX Document  |  1996-08-19  |  4.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000010| 6e 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n Module| \sectco|
|00000020| 64 65 7b 64 72 61 77 66 | 7d 7d 0a 0a 5c 62 69 6d |de{drawf|}}..\bim|
|00000030| 6f 64 69 6e 64 65 78 7b | 64 72 61 77 66 7d 0a 0a |odindex{|drawf}..|
|00000040| 54 68 69 73 20 6d 6f 64 | 75 6c 65 20 70 72 6f 76 |This mod|ule prov|
|00000050| 69 64 65 73 20 61 6e 20 | 69 6e 74 65 72 66 61 63 |ides an |interfac|
|00000060| 65 20 74 6f 20 74 68 65 | 20 52 69 73 63 4f 53 20 |e to the| RiscOS |
|00000070| 64 72 61 77 66 69 6c 65 | 20 6d 6f 64 75 6c 65 2e |drawfile| module.|
|00000080| 20 49 74 20 64 65 66 69 | 6e 65 73 0a 61 20 6e 65 | It defi|nes.a ne|
|00000090| 77 20 6f 62 6a 65 63 74 | 20 74 79 70 65 20 74 68 |w object| type th|
|000000a0| 61 74 20 68 6f 6c 64 73 | 20 61 20 64 72 61 77 66 |at holds| a drawf|
|000000b0| 69 6c 65 2e 20 54 68 65 | 20 64 72 61 77 66 20 74 |ile. The| drawf t|
|000000c0| 79 70 65 20 69 73 20 61 | 20 73 65 71 75 65 6e 63 |ype is a| sequenc|
|000000d0| 65 20 74 79 70 65 2e 0a | 49 74 20 69 73 20 63 6f |e type..|It is co|
|000000e0| 6e 73 69 64 65 72 65 64 | 20 61 73 20 61 20 73 65 |nsidered| as a se|
|000000f0| 71 75 65 6e 63 65 20 6f | 66 20 6f 62 6a 65 63 74 |quence o|f object|
|00000100| 73 2e 20 41 73 73 69 67 | 6e 6d 65 6e 74 20 74 6f |s. Assig|nment to|
|00000110| 20 65 6c 65 6d 65 6e 74 | 73 20 61 6e 64 0a 73 6c | element|s and.sl|
|00000120| 69 63 65 73 2c 20 61 6e | 64 20 72 65 70 65 74 69 |ices, an|d repeti|
|00000130| 74 69 6f 6e 20 61 72 65 | 20 6e 6f 74 20 79 65 74 |tion are| not yet|
|00000140| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 2e 0a 0a 46 | impleme|nted...F|
|00000150| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 20 |or more |details |
|00000160| 73 65 65 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |see the |document|
|00000170| 61 74 69 6f 6e 20 6f 6e | 20 74 68 65 20 64 72 61 |ation on| the dra|
|00000180| 77 20 66 69 6c 65 20 66 | 6f 72 6d 61 74 2c 20 61 |w file f|ormat, a|
|00000190| 6e 64 20 74 68 65 0a 44 | 72 61 77 46 69 6c 65 20 |nd the.D|rawFile |
|000001a0| 6d 6f 64 75 6c 65 2e 0a | 0a 45 72 72 6f 72 73 20 |module..|.Errors |
|000001b0| 61 72 65 20 72 65 70 6f | 72 74 65 64 20 61 73 20 |are repo|rted as |
|000001c0| 65 78 63 65 70 74 69 6f | 6e 73 3b 20 74 68 65 20 |exceptio|ns; the |
|000001d0| 75 73 75 61 6c 20 65 78 | 63 65 70 74 69 6f 6e 73 |usual ex|ceptions|
|000001e0| 20 61 72 65 20 67 69 76 | 65 6e 0a 66 6f 72 20 74 | are giv|en.for t|
|000001f0| 79 70 65 2c 20 69 6e 64 | 65 78 20 61 6e 64 20 76 |ype, ind|ex and v|
|00000200| 61 6c 75 65 20 65 72 72 | 6f 72 73 2c 20 77 68 69 |alue err|ors, whi|
|00000210| 6c 65 20 64 72 61 77 20 | 73 70 65 63 69 66 69 63 |le draw |specific|
|00000220| 20 65 72 72 6f 72 73 20 | 72 61 69 73 65 0a 5c 63 | errors |raise.\c|
|00000230| 6f 64 65 7b 64 72 61 77 | 66 2e 65 72 72 6f 72 7d |ode{draw|f.error}|
|00000240| 20 61 73 20 64 65 73 63 | 72 69 62 65 64 20 62 65 | as desc|ribed be|
|00000250| 6c 6f 77 2e 0a 0a 4d 6f | 64 75 6c 65 20 5c 63 6f |low...Mo|dule \co|
|00000260| 64 65 7b 64 72 61 77 66 | 7d 20 64 65 66 69 6e 65 |de{drawf|} define|
|00000270| 73 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |s the fo|llowing |
|00000280| 64 61 74 61 20 69 74 65 | 6d 73 3a 0a 0a 5c 72 65 |data ite|ms:..\re|
|00000290| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 69 6e 64 65 |newcomma|nd{\inde|
|000002a0| 78 73 75 62 69 74 65 6d | 7d 7b 28 65 78 63 65 70 |xsubitem|}{(excep|
|000002b0| 74 69 6f 6e 20 69 6e 20 | 6d 6f 64 75 6c 65 20 64 |tion in |module d|
|000002c0| 72 61 77 66 29 7d 0a 5c | 62 65 67 69 6e 7b 65 78 |rawf)}.\|begin{ex|
|000002d0| 63 64 65 73 63 7d 7b 65 | 72 72 6f 72 7d 0a 54 68 |cdesc}{e|rror}.Th|
|000002e0| 69 73 20 65 78 63 65 70 | 74 69 6f 6e 20 69 73 20 |is excep|tion is |
|000002f0| 72 61 69 73 65 64 20 6f | 6e 20 64 72 61 77 20 73 |raised o|n draw s|
|00000300| 70 65 63 69 66 69 63 20 | 65 72 72 6f 72 73 0a 20 |pecific |errors. |
|00000310| 28 65 2e 67 2e 2c 20 6e | 6f 74 20 66 6f 72 20 69 |(e.g., n|ot for i|
|00000320| 6c 6c 65 67 61 6c 20 61 | 72 67 75 6d 65 6e 74 20 |llegal a|rgument |
|00000330| 74 79 70 65 73 29 2e 20 | 20 49 74 73 0a 73 74 72 |types). | Its.str|
|00000340| 69 6e 67 20 76 61 6c 75 | 65 20 69 73 20 5c 63 6f |ing valu|e is \co|
|00000350| 64 65 7b 27 64 72 61 77 | 66 2e 65 72 72 6f 72 27 |de{'draw|f.error'|
|00000360| 7d 2e 20 20 54 68 65 20 | 61 63 63 6f 6d 70 61 6e |}. The |accompan|
|00000370| 79 69 6e 67 20 76 61 6c | 75 65 20 69 73 20 61 0a |ying val|ue is a.|
|00000380| 73 74 72 69 6e 67 20 64 | 65 73 63 72 69 62 69 6e |string d|escribin|
|00000390| 67 20 74 68 65 20 65 72 | 72 6f 72 2e 0a 5c 65 6e |g the er|ror..\en|
|000003a0| 64 7b 65 78 63 64 65 73 | 63 7d 0a 0a 49 74 20 64 |d{excdes|c}..It d|
|000003b0| 65 66 69 6e 65 73 20 74 | 68 65 20 66 6f 6c 6c 6f |efines t|he follo|
|000003c0| 77 69 6e 67 20 66 75 6e | 63 74 69 6f 6e 73 3a 0a |wing fun|ctions:.|
|000003d0| 0a 5c 72 65 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |.\renewc|ommand{\|
|000003e0| 69 6e 64 65 78 73 75 62 | 69 74 65 6d 7d 7b 28 69 |indexsub|item}{(i|
|000003f0| 6e 20 6d 6f 64 75 6c 65 | 20 64 72 61 77 66 29 7d |n module| drawf)}|
|00000400| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000410| 7d 7b 6c 6f 61 64 7d 7b | 66 69 6c 65 6e 61 6d 65 |}{load}{|filename|
|00000420| 7d 0a 43 72 65 61 74 65 | 73 20 61 20 6e 65 77 20 |}.Create|s a new |
|00000430| 64 72 61 77 66 20 6f 62 | 6a 65 63 74 20 63 6f 6e |drawf ob|ject con|
|00000440| 74 61 69 6e 69 6e 67 20 | 74 68 65 20 64 72 61 77 |taining |the draw|
|00000450| 66 69 6c 65 20 6c 6f 61 | 64 65 64 20 66 72 6f 6d |file loa|ded from|
|00000460| 20 74 68 65 20 6e 61 6d | 65 64 0a 66 69 6c 65 2e | the nam|ed.file.|
|00000470| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00000480| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000490| 7d 7b 6e 65 77 7d 7b 7d | 0a 43 72 65 61 74 65 73 |}{new}{}|.Creates|
|000004a0| 20 61 20 6e 65 77 20 65 | 6d 70 74 79 20 64 72 61 | a new e|mpty dra|
|000004b0| 77 66 20 6f 62 6a 65 63 | 74 2e 0a 5c 65 6e 64 7b |wf objec|t..\end{|
|000004c0| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 44 72 61 77 66 |funcdesc|}..Drawf|
|000004d0| 20 6f 62 6a 65 63 74 73 | 20 73 75 70 70 6f 72 74 | objects| support|
|000004e0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 64 | the fol|lowing d|
|000004f0| 61 74 61 20 69 74 65 6d | 73 20 61 6e 64 20 6d 65 |ata item|s and me|
|00000500| 74 68 6f 64 73 3a 0a 0a | 5c 62 65 67 69 6e 7b 64 |thods:..|\begin{d|
|00000510| 61 74 61 64 65 73 63 7d | 7b 73 69 7a 65 7d 0a 52 |atadesc}|{size}.R|
|00000520| 65 74 75 72 6e 73 20 74 | 68 65 20 6c 65 6e 67 74 |eturns t|he lengt|
|00000530| 68 20 69 6e 20 62 79 74 | 65 73 20 6f 66 20 74 68 |h in byt|es of th|
|00000540| 65 20 64 72 61 77 66 69 | 6c 65 2e 0a 5c 65 6e 64 |e drawfi|le..\end|
|00000550| 7b 64 61 74 61 64 65 73 | 63 7d 0a 0a 5c 62 65 67 |{datades|c}..\beg|
|00000560| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 62 6f 78 |in{funcd|esc}{box|
|00000570| 7d 7b 5c 6f 70 74 69 6f | 6e 61 6c 7b 6e 7d 7d 0a |}{\optio|nal{n}}.|
|00000580| 52 65 74 75 72 6e 73 20 | 74 68 65 20 62 6f 75 6e |Returns |the boun|
|00000590| 64 69 6e 67 20 62 6f 78 | 20 6f 66 20 6f 62 6a 65 |ding box| of obje|
|000005a0| 63 74 20 6e 75 6d 62 65 | 72 20 5c 76 61 72 7b 6e |ct numbe|r \var{n|
|000005b0| 7d 2c 20 6f 72 20 6f 66 | 20 74 68 65 20 77 68 6f |}, or of| the who|
|000005c0| 6c 65 20 66 69 6c 65 20 | 69 66 20 6e 6f 0a 5c 76 |le file |if no.\v|
|000005d0| 61 72 7b 6e 7d 20 69 73 | 20 67 69 76 65 6e 2e 20 |ar{n} is| given. |
|000005e0| 54 68 65 20 72 65 73 75 | 6c 74 20 69 73 20 61 20 |The resu|lt is a |
|000005f0| 74 75 70 6c 65 20 6f 66 | 20 34 20 69 6e 74 65 67 |tuple of| 4 integ|
|00000600| 65 72 73 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ers..\en|d{funcde|
|00000610| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000620| 64 65 73 63 7d 7b 66 69 | 6e 64 7d 7b 78 2c 79 20 |desc}{fi|nd}{x,y |
|00000630| 5c 6f 70 74 69 6f 6e 61 | 6c 7b 5c 2c 20 6e 7d 7d |\optiona|l{\, n}}|
|00000640| 0a 52 65 74 75 72 6e 73 | 20 74 68 65 20 69 6e 64 |.Returns| the ind|
|00000650| 65 78 20 6f 66 20 74 68 | 65 20 66 69 72 73 74 20 |ex of th|e first |
|00000660| 6f 62 6a 65 63 74 20 69 | 6e 20 74 68 65 20 64 72 |object i|n the dr|
|00000670| 61 77 66 69 6c 65 20 77 | 68 6f 73 65 0a 62 6f 75 |awfile w|hose.bou|
|00000680| 6e 64 69 6e 67 20 62 6f | 78 20 63 6f 6e 74 61 69 |nding bo|x contai|
|00000690| 6e 73 20 28 5c 76 61 72 | 7b 78 7d 2c 5c 76 61 72 |ns (\var|{x},\var|
|000006a0| 7b 79 7d 29 2c 20 6f 72 | 20 74 68 65 20 66 69 72 |{y}), or| the fir|
|000006b0| 73 74 20 6f 62 6a 65 63 | 74 20 61 66 74 65 72 0a |st objec|t after.|
|000006c0| 20 6f 62 6a 65 63 74 20 | 5c 76 61 72 7b 6e 7d 20 | object |\var{n} |
|000006d0| 69 66 20 5c 76 61 72 7b | 6e 7d 20 69 73 20 67 69 |if \var{|n} is gi|
|000006e0| 76 65 6e 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ven..\en|d{funcde|
|000006f0| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000700| 64 65 73 63 7d 7b 66 6f | 6e 74 74 61 62 6c 65 7d |desc}{fo|nttable}|
|00000710| 7b 66 6f 6e 74 64 69 63 | 74 7d 0a 41 64 64 73 20 |{fontdic|t}.Adds |
|00000720| 61 20 66 6f 6e 74 20 74 | 61 62 6c 65 20 6f 62 6a |a font t|able obj|
|00000730| 65 63 74 20 61 74 20 74 | 68 65 20 65 6e 64 20 6f |ect at t|he end o|
|00000740| 66 20 61 20 64 69 61 67 | 72 61 6d 2e 20 54 68 69 |f a diag|ram. Thi|
|00000750| 73 20 77 6f 75 6c 64 20 | 6e 6f 72 6d 61 6c 6c 79 |s would |normally|
|00000760| 20 62 65 20 63 61 6c 6c | 65 64 0a 66 6f 72 20 61 | be call|ed.for a|
|00000770| 6e 20 65 6d 70 74 79 20 | 64 69 61 67 72 61 6d 2c |n empty |diagram,|
|00000780| 20 61 73 20 74 68 65 72 | 65 20 73 68 6f 75 6c 64 | as ther|e should|
|00000790| 20 6f 6e 6c 79 20 62 65 | 20 6f 6e 65 20 73 75 63 | only be| one suc|
|000007a0| 68 20 6f 62 6a 65 63 74 | 2c 20 61 6e 64 20 69 74 |h object|, and it|
|000007b0| 20 6d 75 73 74 0a 70 72 | 65 63 65 65 64 20 61 6c | must.pr|eceed al|
|000007c0| 6c 20 74 65 78 74 20 6f | 62 6a 65 63 74 73 2e 0a |l text o|bjects..|
|000007d0| 5c 76 61 72 7b 66 6f 6e | 74 64 69 63 74 7d 20 69 |\var{fon|tdict} i|
|000007e0| 73 20 61 20 64 69 63 74 | 69 6f 6e 61 72 79 20 77 |s a dict|ionary w|
|000007f0| 69 74 68 20 6b 65 79 73 | 20 74 68 65 20 66 6f 6e |ith keys| the fon|
|00000800| 74 20 6e 75 6d 62 65 72 | 2c 20 61 6e 64 20 76 61 |t number|, and va|
|00000810| 6c 75 65 73 20 74 68 65 | 20 66 6f 6e 74 0a 6e 61 |lues the| font.na|
|00000820| 6d 65 73 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |mes..\en|d{funcde|
|00000830| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000840| 64 65 73 63 7d 7b 67 72 | 6f 75 70 7d 7b 64 72 61 |desc}{gr|oup}{dra|
|00000850| 77 66 7d 0a 41 70 70 65 | 6e 64 73 20 74 68 65 20 |wf}.Appe|nds the |
|00000860| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 5c 76 61 72 |contents| of \var|
|00000870| 7b 64 72 61 77 66 7d 20 | 61 73 20 61 20 67 72 6f |{drawf} |as a gro|
|00000880| 75 70 20 6f 62 6a 65 63 | 74 2e 0a 5c 65 6e 64 7b |up objec|t..\end{|
|00000890| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|000008a0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 70 61 74 68 |n{funcde|sc}{path|
|000008b0| 7d 7b 70 61 74 68 64 65 | 73 63 2c 73 74 79 6c 65 |}{pathde|sc,style|
|000008c0| 20 5c 6f 70 74 69 6f 6e | 61 6c 7b 5c 2c 20 64 61 | \option|al{\, da|
|000008d0| 73 68 70 61 74 74 65 72 | 6e 20 5c 2c 20 64 61 73 |shpatter|n \, das|
|000008e0| 68 73 74 61 72 74 7d 7d | 0a 41 64 64 73 20 61 20 |hstart}}|.Adds a |
|000008f0| 70 61 74 68 2e 20 5c 76 | 61 72 7b 70 61 74 68 64 |path. \v|ar{pathd|
|00000900| 65 73 63 7d 20 69 73 20 | 61 20 6c 69 73 74 20 63 |esc} is |a list c|
|00000910| 6f 6e 73 69 73 74 69 6e | 67 20 6f 66 20 69 6e 74 |onsistin|g of int|
|00000920| 65 67 65 72 73 20 6f 72 | 20 70 61 69 72 73 20 6f |egers or| pairs o|
|00000930| 66 0a 69 6e 74 65 67 65 | 72 73 2e 20 54 68 65 20 |f.intege|rs. The |
|00000940| 64 61 74 61 20 69 73 20 | 74 68 61 74 20 72 65 71 |data is |that req|
|00000950| 75 69 72 65 64 20 66 6f | 72 20 61 20 64 72 61 77 |uired fo|r a draw|
|00000960| 20 70 61 74 68 20 63 6f | 6d 70 6f 6e 65 6e 74 2c | path co|mponent,|
|00000970| 20 65 78 63 65 70 74 20 | 74 68 65 0a 69 6e 69 74 | except |the.init|
|00000980| 69 61 6c 20 6d 6f 76 65 | 20 61 6e 64 20 66 69 6e |ial move| and fin|
|00000990| 61 6c 20 65 6e 64 20 61 | 72 65 20 61 64 64 65 64 |al end a|re added|
|000009a0| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 2e 0a | automat|ically..|
|000009b0| 54 68 65 20 5c 76 61 72 | 7b 73 74 79 6c 65 7d 20 |The \var|{style} |
|000009c0| 69 73 20 61 20 74 75 70 | 6c 65 20 6f 66 20 34 20 |is a tup|le of 4 |
|000009d0| 69 6e 74 65 67 65 72 73 | 20 72 65 70 72 65 73 65 |integers| represe|
|000009e0| 6e 74 69 6e 67 20 74 68 | 65 20 66 69 6c 6c 20 63 |nting th|e fill c|
|000009f0| 6f 6c 6f 75 72 2c 0a 6f | 75 74 6c 69 6e 65 20 63 |olour,.o|utline c|
|00000a00| 6f 6c 6f 75 72 2c 20 6f | 75 74 6c 69 6e 65 20 77 |olour, o|utline w|
|00000a10| 69 64 74 68 20 61 6e 64 | 20 70 61 74 68 20 73 74 |idth and| path st|
|00000a20| 79 6c 65 20 64 65 73 63 | 72 69 70 74 69 6f 6e 2e |yle desc|ription.|
|00000a30| 0a 0a 54 68 65 20 5c 76 | 61 72 7b 64 61 73 68 70 |..The \v|ar{dashp|
|00000a40| 61 74 74 65 72 6e 7d 20 | 69 73 20 61 20 6c 69 73 |attern} |is a lis|
|00000a50| 74 20 6f 66 20 69 6e 74 | 65 67 65 72 73 20 72 65 |t of int|egers re|
|00000a60| 70 72 65 73 65 6e 74 69 | 6e 67 20 6c 65 6e 67 74 |presenti|ng lengt|
|00000a70| 68 73 20 6f 66 20 0a 64 | 61 73 68 20 65 6c 65 6d |hs of .d|ash elem|
|00000a80| 65 6e 74 73 2e 20 5c 76 | 61 72 7b 64 61 73 68 73 |ents. \v|ar{dashs|
|00000a90| 74 61 72 74 7d 20 69 73 | 20 61 6e 20 69 6e 74 65 |tart} is| an inte|
|00000aa0| 67 65 72 20 72 65 70 72 | 65 73 65 6e 74 69 6e 67 |ger repr|esenting|
|00000ab0| 20 74 68 65 20 64 69 73 | 74 61 6e 63 65 20 69 6e | the dis|tance in|
|00000ac0| 74 6f 0a 74 68 65 20 70 | 61 74 74 65 72 6e 20 74 |to.the p|attern t|
|00000ad0| 6f 20 73 74 61 72 74 2c | 20 69 74 20 64 65 66 61 |o start,| it defa|
|00000ae0| 75 6c 74 73 20 74 6f 20 | 7a 65 72 6f 2e 0a 54 68 |ults to |zero..Th|
|00000af0| 65 20 64 61 73 68 20 70 | 61 74 74 65 72 6e 20 62 |e dash p|attern b|
|00000b00| 69 74 20 6f 66 20 74 68 | 65 20 73 74 79 6c 65 20 |it of th|e style |
|00000b10| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 77 6f 72 64 |descript|ion word|
|00000b20| 20 69 73 20 73 65 74 20 | 61 75 74 6f 6d 61 74 69 | is set |automati|
|00000b30| 63 61 6c 6c 79 0a 61 63 | 63 6f 72 64 69 6e 67 20 |cally.ac|cording |
|00000b40| 74 6f 20 74 68 65 20 70 | 72 65 73 65 6e 63 65 20 |to the p|resence |
|00000b50| 6f 66 20 61 20 64 61 73 | 68 20 70 61 74 74 65 72 |of a das|h patter|
|00000b60| 6e 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |n..\end{|funcdesc|
|00000b70| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00000b80| 73 63 7d 7b 70 61 74 68 | 63 6f 6c 6f 75 72 7d 7b |sc}{path|colour}{|
|00000b90| 63 6f 6c 6f 75 72 20 5c | 6f 70 74 69 6f 6e 61 6c |colour \|optional|
|00000ba0| 7b 5c 2c 20 6e 20 2e 2e | 2e 7d 7d 0a 53 65 74 73 |{\, n ..|.}}.Sets|
|00000bb0| 20 74 68 65 20 63 6f 6c | 6f 75 72 20 6f 66 20 70 | the col|our of p|
|00000bc0| 61 74 68 73 2e 20 49 66 | 20 6e 6f 20 5c 76 61 72 |aths. If| no \var|
|00000bd0| 7b 6e 7d 20 69 73 20 67 | 69 76 65 6e 20 61 6c 6c |{n} is g|iven all|
|00000be0| 20 70 61 74 68 73 20 69 | 6e 20 74 68 65 20 64 69 | paths i|n the di|
|00000bf0| 61 67 72 61 6d 0a 61 72 | 65 20 63 68 61 6e 67 65 |agram.ar|e change|
|00000c00| 64 2c 0a 6f 74 68 65 72 | 77 69 73 65 20 74 68 65 |d,.other|wise the|
|00000c10| 20 5c 76 61 72 7b 6e 7d | 20 6d 75 73 74 20 62 65 | \var{n}| must be|
|00000c20| 20 69 6e 64 69 63 65 73 | 20 6f 66 20 70 61 74 68 | indices| of path|
|00000c30| 20 6f 72 20 67 72 6f 75 | 70 20 6f 62 6a 65 63 74 | or grou|p object|
|00000c40| 73 2e 20 54 68 65 20 70 | 61 74 68 0a 6f 62 6a 65 |s. The p|ath.obje|
|00000c50| 63 74 73 20 68 61 76 65 | 20 74 68 65 69 72 20 63 |cts have| their c|
|00000c60| 6f 6c 6f 75 72 73 20 63 | 68 61 6e 67 65 64 2e 20 |olours c|hanged. |
|00000c70| 54 68 65 20 67 72 6f 75 | 70 20 6f 62 6a 65 63 74 |The grou|p object|
|00000c80| 73 20 61 72 65 20 73 65 | 61 72 63 68 65 64 20 72 |s are se|arched r|
|00000c90| 65 63 75 72 73 69 76 65 | 6c 79 0a 66 6f 72 20 70 |ecursive|ly.for p|
|00000ca0| 61 74 68 73 2e 0a 5c 65 | 6e 64 7b 66 75 6e 63 64 |aths..\e|nd{funcd|
|00000cb0| 65 73 63 7d 0a 0a 5c 62 | 65 67 69 6e 7b 66 75 6e |esc}..\b|egin{fun|
|00000cc0| 63 64 65 73 63 7d 7b 70 | 61 74 68 66 69 6c 6c 7d |cdesc}{p|athfill}|
|00000cd0| 7b 63 6f 6c 6f 75 72 20 | 5c 6f 70 74 69 6f 6e 61 |{colour |\optiona|
|00000ce0| 6c 7b 5c 2c 20 6e 20 2e | 2e 2e 7d 7d 0a 53 65 74 |l{\, n .|..}}.Set|
|00000cf0| 73 20 74 68 65 20 66 69 | 6c 6c 20 63 6f 6c 6f 75 |s the fi|ll colou|
|00000d00| 72 2e 20 5c 76 61 72 7b | 6e 7d 20 69 73 20 61 73 |r. \var{|n} is as|
|00000d10| 20 66 6f 72 20 5c 63 6f | 64 65 7b 70 61 74 68 63 | for \co|de{pathc|
|00000d20| 6f 6c 6f 75 72 7d 2e 0a | 5c 65 6e 64 7b 66 75 6e |olour}..|\end{fun|
|00000d30| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000d40| 75 6e 63 64 65 73 63 7d | 7b 72 65 6e 64 65 72 7d |uncdesc}|{render}|
|00000d50| 7b 66 6c 61 67 73 2c 74 | 72 61 6e 73 2c 63 6c 69 |{flags,t|rans,cli|
|00000d60| 70 2c 66 6c 61 74 7d 0a | 52 65 6e 64 65 72 73 20 |p,flat}.|Renders |
|00000d70| 74 68 65 20 64 69 61 67 | 72 61 6d 2e 20 5c 76 61 |the diag|ram. \va|
|00000d80| 72 7b 66 6c 61 67 73 7d | 20 61 6e 64 20 5c 76 61 |r{flags}| and \va|
|00000d90| 72 7b 66 6c 61 74 7d 20 | 61 72 65 20 69 6e 74 65 |r{flat} |are inte|
|00000da0| 67 65 72 73 2e 0a 5c 76 | 61 72 7b 74 72 61 6e 73 |gers..\v|ar{trans|
|00000db0| 7d 20 69 73 20 74 68 65 | 20 61 64 64 72 65 73 73 |} is the| address|
|00000dc0| 20 6f 66 20 61 20 62 6c | 6f 63 6b 20 6f 66 20 36 | of a bl|ock of 6|
|00000dd0| 20 69 6e 74 65 67 65 72 | 73 2e 0a 5c 76 61 72 7b | integer|s..\var{|
|00000de0| 63 6c 69 70 7d 20 69 73 | 20 74 68 65 20 61 64 64 |clip} is| the add|
|00000df0| 72 65 73 73 20 6f 66 20 | 61 20 62 6c 6f 63 6b 20 |ress of |a block |
|00000e00| 6f 66 20 34 20 69 6e 74 | 65 67 65 72 73 2e 0a 53 |of 4 int|egers..S|
|00000e10| 65 65 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 61 |ee the d|ocumenta|
|00000e20| 74 69 6f 6e 20 6f 66 20 | 53 57 49 20 44 72 61 77 |tion of |SWI Draw|
|00000e30| 46 69 6c 65 5f 52 65 6e | 64 65 72 20 66 6f 72 20 |File_Ren|der for |
|00000e40| 64 65 74 61 69 6c 73 2e | 0a 5c 65 6e 64 7b 66 75 |details.|.\end{fu|
|00000e50| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000e60| 66 75 6e 63 64 65 73 63 | 7d 7b 73 61 76 65 7d 7b |funcdesc|}{save}{|
|00000e70| 66 69 6c 65 6e 61 6d 65 | 7d 0a 53 61 76 65 73 20 |filename|}.Saves |
|00000e80| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 61 73 20 |the cont|ents as |
|00000e90| 61 20 64 72 61 77 66 69 | 6c 65 20 77 69 74 68 20 |a drawfi|le with |
|00000ea0| 6e 61 6d 65 20 5c 76 61 | 72 7b 66 69 6c 65 6e 61 |name \va|r{filena|
|00000eb0| 6d 65 7d 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |me}..\en|d{funcde|
|00000ec0| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000ed0| 64 65 73 63 7d 7b 74 65 | 78 74 7d 7b 70 6f 69 6e |desc}{te|xt}{poin|
|00000ee0| 74 5c 2c 20 74 65 78 74 | 5c 2c 20 73 74 79 6c 65 |t\, text|\, style|
|00000ef0| 7d 0a 41 64 64 73 20 61 | 20 74 65 78 74 20 6f 62 |}.Adds a| text ob|
|00000f00| 6a 65 63 74 2e 20 5c 76 | 61 72 7b 70 6f 69 6e 74 |ject. \v|ar{point|
|00000f10| 7d 20 69 73 20 61 20 70 | 61 69 72 20 67 69 76 69 |} is a p|air givi|
|00000f20| 6e 67 20 74 68 65 20 78 | 20 61 6e 64 20 79 20 63 |ng the x| and y c|
|00000f30| 6f 6f 72 64 69 6e 61 74 | 65 73 20 6f 66 0a 74 68 |oordinat|es of.th|
|00000f40| 65 20 73 74 61 72 74 20 | 6f 66 20 74 68 65 20 74 |e start |of the t|
|00000f50| 65 78 74 20 62 61 73 65 | 20 6c 69 6e 65 2e 0a 5c |ext base| line..\|
|00000f60| 76 61 72 7b 74 65 78 74 | 7d 20 69 73 20 74 68 65 |var{text|} is the|
|00000f70| 20 74 65 78 74 20 74 6f | 20 70 72 69 6e 74 2e 20 | text to| print. |
|00000f80| 5c 76 61 72 7b 73 74 79 | 6c 65 7d 20 69 73 20 61 |\var{sty|le} is a|
|00000f90| 20 74 75 70 6c 65 20 6f | 66 0a 35 20 69 6e 74 65 | tuple o|f.5 inte|
|00000fa0| 67 65 72 73 2c 20 74 68 | 65 20 74 65 78 74 20 63 |gers, th|e text c|
|00000fb0| 6f 6c 6f 75 72 2c 20 74 | 65 78 74 20 62 61 63 6b |olour, t|ext back|
|00000fc0| 67 72 6f 75 6e 64 20 63 | 6f 6c 6f 75 72 20 68 69 |ground c|olour hi|
|00000fd0| 6e 74 2c 20 66 6f 6e 74 | 20 6e 75 6d 62 65 72 2c |nt, font| number,|
|00000fe0| 0a 61 6e 64 20 78 20 61 | 6e 64 20 79 20 73 69 7a |.and x a|nd y siz|
|00000ff0| 65 73 20 6f 66 20 74 68 | 65 20 66 6f 6e 74 2e 20 |es of th|e font. |
|00001000| 54 68 65 20 73 69 7a 65 | 73 20 61 72 65 20 69 6e |The size|s are in|
|00001010| 20 24 31 2f 36 34 30 24 | 20 70 6f 69 6e 74 2e 20 | $1/640$| point. |
|00001020| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00001030| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00001040| 7d 7b 74 65 78 74 62 61 | 63 6b 67 72 6f 75 6e 64 |}{textba|ckground|
|00001050| 7d 7b 63 6f 6c 6f 75 72 | 20 5c 6f 70 74 69 6f 6e |}{colour| \option|
|00001060| 61 6c 7b 5c 2c 20 6e 20 | 2e 2e 2e 7d 7d 0a 53 65 |al{\, n |...}}.Se|
|00001070| 74 73 20 74 68 65 20 74 | 65 78 74 20 62 61 63 6b |ts the t|ext back|
|00001080| 67 72 6f 75 6e 64 20 63 | 6f 6c 6f 75 72 20 68 69 |ground c|olour hi|
|00001090| 6e 74 2e 20 5c 76 61 72 | 7b 6e 7d 20 69 73 20 69 |nt. \var|{n} is i|
|000010a0| 6e 74 65 72 70 72 65 74 | 65 64 20 61 73 20 66 6f |nterpret|ed as fo|
|000010b0| 72 0a 5c 63 6f 64 65 7b | 70 61 74 68 63 6f 6c 6f |r.\code{|pathcolo|
|000010c0| 75 72 7d 20 62 75 74 20 | 75 73 69 6e 67 20 67 72 |ur} but |using gr|
|000010d0| 6f 75 70 73 20 61 6e 64 | 20 74 65 78 74 20 6f 62 |oups and| text ob|
|000010e0| 6a 65 63 74 73 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |jects..\|end{func|
|000010f0| 64 65 73 63 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|00001100| 6e 63 64 65 73 63 7d 7b | 74 65 78 74 63 6f 6c 6f |ncdesc}{|textcolo|
|00001110| 75 72 7d 7b 63 6f 6c 6f | 75 72 20 5c 6f 70 74 69 |ur}{colo|ur \opti|
|00001120| 6f 6e 61 6c 7b 5c 2c 20 | 6e 20 2e 2e 2e 7d 7d 0a |onal{\, |n ...}}.|
|00001130| 53 65 74 73 20 74 68 65 | 20 74 65 78 74 20 63 6f |Sets the| text co|
|00001140| 6c 6f 75 72 2e 20 5c 76 | 61 72 7b 6e 7d 20 69 73 |lour. \v|ar{n} is|
|00001150| 20 69 6e 74 65 72 70 72 | 65 74 65 64 20 61 73 20 | interpr|eted as |
|00001160| 66 6f 72 0a 5c 63 6f 64 | 65 7b 70 61 74 68 63 6f |for.\cod|e{pathco|
|00001170| 6c 6f 75 72 7d 20 62 75 | 74 20 75 73 69 6e 67 20 |lour} bu|t using |
|00001180| 67 72 6f 75 70 73 20 61 | 6e 64 20 74 65 78 74 20 |groups a|nd text |
|00001190| 6f 62 6a 65 63 74 73 2e | 0a 5c 65 6e 64 7b 66 75 |objects.|.\end{fu|
|000011a0| 6e 63 64 65 73 63 7d 0a | 0a 41 6c 6c 20 64 69 73 |ncdesc}.|.All dis|
|000011b0| 74 61 6e 63 65 73 20 69 | 6e 20 67 72 6f 75 70 20 |tances i|n group |
|000011c0| 6f 62 6a 65 63 74 73 20 | 61 72 65 20 69 6e 20 64 |objects |are in d|
|000011d0| 72 61 77 20 75 6e 69 74 | 73 20 24 28 31 2f 34 36 |raw unit|s $(1/46|
|000011e0| 30 38 30 29 24 20 69 6e | 63 68 2e 0a 0a 43 6f 6c |080)$ in|ch...Col|
|000011f0| 6f 75 72 73 20 61 72 65 | 20 69 6e 74 65 67 65 72 |ours are| integer|
|00001200| 73 20 6f 66 20 74 68 65 | 20 66 6f 72 6d 20 5c 63 |s of the| form \c|
|00001210| 6f 64 65 7b 30 78 62 62 | 67 67 72 72 30 30 7d 20 |ode{0xbb|ggrr00} |
|00001220| 6f 72 5c 63 6f 64 65 7b | 2d 31 7d 20 66 6f 72 20 |or\code{|-1} for |
|00001230| 74 72 61 6e 73 70 61 72 | 65 6e 74 2e 0a |transpar|ent.. |
+--------+-------------------------+-------------------------+--------+--------+