| 1 |
/* psspec.h |
| 2 |
* Page spec routines for page rearrangement |
| 3 |
* |
| 4 |
* (c) Reuben Thomas 2012 |
| 5 |
* (c) Angus J. C. Duggan 1991-1997 |
| 6 |
* See file LICENSE for details. |
| 7 |
*/ |
| 8 |
|
| 9 |
/* pagespec flags */ |
| 10 |
#define ADD_NEXT (0x01) |
| 11 |
#define ROTATE (0x02) |
| 12 |
#define HFLIP (0x04) |
| 13 |
#define VFLIP (0x08) |
| 14 |
#define SCALE (0x10) |
| 15 |
#define OFFSET (0x20) |
| 16 |
#define REVERSED (0x40) |
| 17 |
#define GSAVE (ROTATE|HFLIP|VFLIP|SCALE|OFFSET) |
| 18 |
|
| 19 |
typedef struct pagespec { |
| 20 |
int pageno, flags, rotate; |
| 21 |
double xoff, yoff, scale; |
| 22 |
struct pagespec *next; |
| 23 |
} PageSpec ; |
| 24 |
|
| 25 |
extern double width, height; /* Width and height of paper in PostScript pt */ |
| 26 |
|
| 27 |
extern PageSpec *newspec(void); |
| 28 |
extern int parseint(char **sp); |
| 29 |
extern double parsedouble(char **sp); |
| 30 |
extern double parsedimen(char **sp); |
| 31 |
extern double singledimen(char *str); |
| 32 |
extern void pstops(int modulo, int pps, int nobind, PageSpec *specs, |
| 33 |
double draw); |
| 34 |
extern void pstops_write(int modulo, int pps, int nobind, PageSpec *specs, |
| 35 |
double draw, off_t *ignorelist); |