home *** CD-ROM | disk | FTP | other *** search
/ VRML Tools for 3D Cyberspace / VRML_Tools_For_3D_Cyberspace.iso / t_space2 / set14 < prev    next >
Text File  |  1996-07-01  |  6KB  |  342 lines

  1. %%BeginProcSet: Adobe_pattern 1.10 0
  2. currentpacking true setpacking
  3. userdict /Adobe_pattern 14 dict dup begin put
  4. /initialize
  5. {
  6. /definepattern where
  7.     {
  8.     pop
  9.     }
  10.     {
  11.     Adobe_pattern begin
  12.     Adobe_pattern
  13.         {
  14.         dup xcheck
  15.             {
  16.             bind
  17.             } if
  18.         pop pop
  19.         } forall
  20.     mark
  21.     cachestatus 7 1 roll pop pop pop pop exch pop exch
  22.         {
  23.         {
  24.         10000 add
  25.         dup 2 index gt
  26.             {
  27.             break
  28.             } if
  29.         dup setcachelimit
  30.         } loop
  31.         } stopped
  32.     cleartomark
  33.     } ifelse
  34. } def
  35. /terminate
  36. {
  37. currentdict Adobe_pattern eq
  38.     {
  39.  end
  40.     } if
  41. } def
  42. errordict
  43. /nocurrentpoint
  44. {
  45. pop
  46. stop
  47. } put
  48. errordict
  49. /invalidaccess
  50. {
  51. pop
  52. stop
  53. } put
  54. /patternencoding
  55. 256 array def
  56. 0 1 255
  57. {
  58. patternencoding exch ( ) 2 copy exch 0 exch put cvn put
  59. } for
  60. /definepattern
  61. {
  62. 17 dict begin
  63. /uniform exch def
  64. /cache exch def
  65. /key exch def
  66. /procarray exch def
  67. /mtx exch matrix invertmatrix def
  68. /height exch def
  69. /width exch def
  70. /ctm matrix currentmatrix def
  71. /ptm matrix def
  72. /str 32 string def
  73. /slice 9 dict def
  74. slice /s 1 put
  75. slice /q 256 procarray length div sqrt floor cvi put
  76. slice /b 0 put
  77. /FontBBox [0 0 0 0] def
  78. /FontMatrix mtx matrix copy def
  79. /Encoding patternencoding def
  80. /FontType 3 def
  81. /BuildChar
  82.     {
  83.     exch
  84.  begin
  85.     /setstrokeadjust where {pop true setstrokeadjust} if
  86.     slice begin
  87.     dup q dup mul mod s idiv /i exch def
  88.     dup q dup mul mod s mod /j exch def
  89.     q dup mul idiv procarray exch get
  90.     /xl j width s div mul def
  91.     /xg j 1 add width s div mul def
  92.     /yl i height s div mul def
  93.     /yg i 1 add height s div mul def
  94.     uniform
  95.         {
  96.         1 1
  97.         }
  98.         {
  99.         width 0 dtransform
  100.         dup mul exch dup mul add sqrt dup 1 add exch div
  101.         0 height dtransform
  102.         dup mul exch dup mul add sqrt dup 1 add exch div
  103.         } ifelse
  104.     width 0 cache
  105.         {
  106.         xl 4 index mul yl 4 index mul xg 6 index mul yg 6 index mul
  107.         setcachedevice
  108.         }
  109.         {
  110.         setcharwidth
  111.         } ifelse
  112.     gsave
  113.     scale
  114.     newpath
  115.     xl yl moveto
  116.     xg yl lineto
  117.     xg yg lineto
  118.     xl yg lineto
  119.     closepath
  120.     clip
  121.     newpath
  122.  end
  123.  end
  124.     exec
  125.     grestore
  126.     } def
  127. key currentdict definefont
  128. end
  129. } def
  130. /patterncachesize
  131. {
  132. gsave
  133. newpath
  134. 0 0 moveto
  135. width 0 lineto
  136. width height lineto
  137. 0 height lineto
  138. closepath
  139. patternmatrix setmatrix
  140. pathbbox
  141. exch ceiling 4 -1 roll floor sub 3 1 roll
  142. ceiling exch floor sub
  143. mul 1 add
  144. grestore
  145. } def
  146. /patterncachelimit
  147. {
  148. cachestatus 7 1 roll pop pop pop pop pop pop 8 mul
  149. } def
  150. /patternpath
  151. {
  152. exch dup begin setfont
  153. ctm setmatrix
  154. concat
  155. slice exch /b exch slice /q get dup mul mul put
  156. FontMatrix concat
  157. uniform
  158.     {
  159.     width 0 dtransform round width div exch round width div exch
  160.     0 height dtransform round height div exch height div exch
  161.     0 0 transform round exch round exch
  162.     ptm astore setmatrix
  163.     }
  164.     {
  165.     ptm currentmatrix pop
  166.     } ifelse
  167. {currentpoint} stopped not
  168.     {
  169.     pop pop
  170.     pathbbox
  171.     true
  172.     4 index 3 index eq
  173.     4 index 3 index eq
  174.     and
  175.         {
  176.         pop false
  177.             {
  178.             {pop pop}
  179.             {pop pop pop true}
  180.             {pop pop pop pop pop pop pop true}
  181.             {pop true}
  182.             pathforall
  183.             } stopped
  184.             {
  185.             pop pop pop pop pop true
  186.             } if
  187.         } if
  188.         {
  189.         height div ceiling height mul 4 1 roll
  190.         width div ceiling width mul 4 1 roll
  191.         height div floor height mul 4 1 roll
  192.         width div floor width mul 4 1 roll
  193.         2 index sub height div ceiling cvi exch
  194.         3 index sub width div ceiling cvi exch
  195.         4 2 roll moveto
  196.         FontMatrix mtx invertmatrix
  197.         dup dup 4 get exch 5 get rmoveto
  198.         ptm ptm concatmatrix pop
  199.         slice /s
  200.         patterncachesize patterncachelimit div ceiling sqrt ceiling cvi
  201.         dup slice /q get gt
  202.             {
  203.             pop slice /q get
  204.             } if
  205.         put
  206.         0 1 slice /s get dup mul 1 sub
  207.             {
  208.             slice /b get add
  209.             gsave
  210.             0 1 str length 1 sub
  211.                 {
  212.                 str exch 2 index put
  213.                 } for
  214.             pop
  215.             dup
  216.                 {
  217.                 gsave
  218.                 ptm setmatrix
  219.                 1 index str length idiv {str show} repeat
  220.                 1 index str length mod str exch 0 exch getinterval show
  221.                 grestore
  222.                 0 height rmoveto
  223.                 } repeat
  224.             grestore
  225.             } for
  226.         pop pop
  227.         }
  228.         {
  229.         pop pop pop pop
  230.         } ifelse
  231.     } if
  232. end
  233. } def
  234. /patternclip
  235. {
  236. clip
  237. } def
  238. /patternstrokepath
  239. {
  240. strokepath
  241. } def
  242. /patternmatrix
  243. matrix def
  244. /patternfill
  245. {
  246. dup type /dicttype eq
  247.     {
  248.     Adobe_pattern /patternmatrix get
  249.     } if
  250. gsave
  251. patternclip
  252. Adobe_pattern /patternpath get exec
  253. grestore
  254. newpath
  255. } def
  256. /patternstroke
  257. {
  258. dup type /dicttype eq
  259.     {
  260.     Adobe_pattern /patternmatrix get
  261.     } if
  262. gsave
  263. patternstrokepath
  264. true
  265.     {
  266.         {
  267.             {
  268.             newpath 
  269.             moveto
  270.             }
  271.             {
  272.             lineto
  273.             }
  274.             {
  275.             curveto
  276.             }
  277.             {
  278.             closepath
  279.             3 copy
  280.             Adobe_pattern /patternfill get exec
  281.             } pathforall
  282.         pop pop    pop
  283.         } stopped
  284.             {
  285.             pop pop pop pop pop
  286.             patternclip
  287.             Adobe_pattern /patternfill get exec
  288.             } if
  289.     }
  290.     {
  291.     patternclip
  292.     Adobe_pattern /patternfill get exec
  293.     } ifelse
  294. grestore
  295. newpath
  296. } def
  297. /patternashow
  298. {
  299. 3 index type /dicttype eq
  300.     {
  301.     Adobe_pattern /patternmatrix get 4 1 roll
  302.     } if
  303.     {
  304.     pop pop (0) exch
  305.     2 copy 0 exch put pop
  306.     gsave
  307.     false charpath
  308.     currentpoint
  309.     6 index 6 index 6 index
  310.     Adobe_pattern /patternfill get exec
  311.     grestore
  312.     newpath moveto
  313.     2 copy rmoveto
  314.     } exch cshow
  315. pop pop pop pop pop
  316. } def
  317. /patternashowstroke
  318. {
  319. 4 index type /dicttype eq
  320.     {
  321.     patternmatrix /patternmatrix get 5 1 roll
  322.     } if
  323. 4 1 roll
  324.     {
  325.     pop pop (0) exch
  326.     2 copy 0 exch put pop
  327.     gsave
  328.     false charpath
  329.     currentpoint
  330.     4 index setmatrix
  331.     7 index 7 index 7 index
  332.     Adobe_pattern /patternstroke get exec
  333.     grestore
  334.     newpath moveto
  335.     2 copy rmoveto
  336.     } exch cshow
  337. pop pop pop pop pop pop
  338. } def
  339. currentdict readonly pop end
  340. setpacking
  341. %%EndProcSet
  342.