URI:
       troundpage.ps - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       troundpage.ps (695B)
       ---
            1 %
            2 % Tries to round clipping path dimensions, as stored in array pagebbox, so they
            3 % match one of the known sizes in the papersizes array. Lower left coordinates
            4 % are always set to 0.
            5 %
            6 
            7 /roundpagebbox {
            8     7 dict begin
            9         /papersizes [8.5 inch 11 inch 14 inch 17 inch] def
           10 
           11         /mappapersize {
           12                 /val exch def
           13                 /slop .5 inch def
           14                 /diff slop def
           15                 /j 0 def
           16                 0 1 papersizes length 1 sub {
           17                         /i exch def
           18                         papersizes i get val sub abs
           19                         dup diff le {/diff exch def /j i def} {pop} ifelse
           20                 } for
           21                 diff slop lt {papersizes j get} {val} ifelse
           22         } def
           23 
           24         pagebbox 0 0 put
           25         pagebbox 1 0 put
           26         pagebbox dup 2 get mappapersize 2 exch put
           27         pagebbox dup 3 get mappapersize 3 exch put
           28     end
           29 } bind def
           30