File: tilepage

package info (click to toggle)
libtemplate-perl 2.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 5,496 kB
  • ctags: 667
  • sloc: perl: 15,349; makefile: 62; xml: 7; sh: 5
file content (25 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[%  PROCESS ps/tiles UNLESS global.ps.loaded.tiles;
    global.ps.loaded.tilepage = 1;
-%]
% perform tiling calculations
tile-path tiles

% generate tiled pages
tiles-ny 1 sub -1 0
{
    /tilepage-y exch def
    0 1 tiles-nx 1 sub
    {
        /tilepage-x exch def
        tile-page
        gsave
            clip-box rectclip
            % translate origin to the new image rectangle
            tiles-xorg tiles-yorg translate
            tilepage-x clip-xsize mul neg 
            tilepage-y clip-ysize mul neg translate
            tile-image
            showpage
        grestore
    } for
} for