File: utilNup.h

package info (click to toggle)
ted 2.16-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,944 kB
  • ctags: 20,273
  • sloc: ansic: 167,980; makefile: 12,518; sh: 263
file content (79 lines) | stat: -rw-r--r-- 2,176 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#   ifndef	UTIL_NUP_H
#   define	UTIL_NUP_H

#   include	<geo2DInteger.h>
#   include	<utilDocumentGeometry.h>
#   include	<utilAffineTransform.h>

/************************************************************************/
/*									*/
/*  Position the pages of a document on successive sheets of paper.	*/
/*									*/
/************************************************************************/

typedef struct NupSchema
    {
    AffineTransform2D		nsBaseTransform;
    int				nsNup;
    int				nsRows;
    int				nsCols;
    AffineTransform2D *		nsNupTransforms;
    int				nsXShift;
    } NupSchema;

/************************************************************************/
/*									*/
/*  Geometry specifications for a print job.				*/
/*									*/
/************************************************************************/

typedef struct PrintGeometry
    {
    DocumentGeometry	pgSheetGeometry;
    int			pgRotatePage90;
    int			pgCenterPageHorizontally;
    int			pgGridRows;
    int			pgGridCols;
    int			pgGridHorizontal;
    int			pgScalePagesToFit;
    } PrintGeometry;

/************************************************************************/
/*									*/
/*  Routine declarations.						*/
/*									*/
/************************************************************************/

extern void utilInitPrintGeometry(	PrintGeometry *	pg );

extern void utilInitNupSchema(	NupSchema *		ns );
extern void utilCleanNupSchema(	NupSchema *		ns );

extern int utilNupGetBaseTranform(
			AffineTransform2D *		pAt1Page,
			int *				pRotatePages,
			const PrintGeometry *		pg,
			const DocumentGeometry *	dgPage,
			double				fac );

extern void utilNupSheetBoundingBox(
			DocumentRectangle *		sheetBBox,
			const NupSchema *		ns,
			const DocumentGeometry *	dgPage,
			int				hasPageHeader,
			int				hasPageFooter );

extern int utilNupSetSchema(
			NupSchema *			ns,
			int				rotateSheetGrid,
			const AffineTransform2D *	at1Page,
			const PrintGeometry *		pg,
			double				fac,
			const DocumentGeometry *	dgPage );

extern void utilNupGetPageTranform(
			AffineTransform2D *		at,
			const NupSchema *		ns,
			int				page );

#   endif	/*  UTIL_NUP_H  */