Annotation of researchv10no/cmd/post.src/psfiles/roundpage.ps, revision 1.1.1.1

1.1       root        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: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.