1 /* pdfpage.h
2 
3    Copyright 2009 Taco Hoekwater <taco@luatex.org>
4 
5    This file is part of LuaTeX.
6 
7    LuaTeX is free software; you can redistribute it and/or modify it under
8    the terms of the GNU General Public License as published by the Free
9    Software Foundation; either version 2 of the License, or (at your
10    option) any later version.
11 
12    LuaTeX is distributed in the hope that it will be useful, but WITHOUT
13    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
15    License for more details.
16 
17    You should have received a copy of the GNU General Public License along
18    with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
19 
20 
21 #ifndef PDFPAGE_H
22 #  define PDFPAGE_H
23 
24 #  define is_pagemode(p)      ((p)->mode == PMODE_PAGE)
25 #  define is_textmode(p)      ((p)->mode == PMODE_TEXT)
26 #  define is_chararraymode(p) ((p)->mode == PMODE_CHARARRAY)
27 #  define is_charmode(p)      ((p)->mode == PMODE_CHAR)
28 
29 #  define setpdffloat(a,b,c) do {(a).m = (b); (a).e = (c);} while (0)
30 
31 #  ifdef hz
32 /* AIX 4.3 defines hz as 100 in system headers */
33 #    undef hz
34 #  endif
35 
36 /**********************************************************************/
37 
38 void synch_pos_with_cur(posstructure * pos, posstructure * refpos,
39                         scaledpos cur);
40 
41 boolean calc_pdfpos(pdfstructure * p, scaledpos pos);
42 void pdf_end_string_nl(PDF pdf);
43 void pdf_goto_pagemode(PDF pdf);
44 void pdf_goto_textmode(PDF pdf);
45 void init_pdf_pagecalculations(PDF pdf);
46 void pdf_print_cm(PDF pdf, pdffloat * cm);
47 void pdf_set_pos(PDF pdf, scaledpos pos);
48 void pdf_set_pos_temp(PDF pdf, scaledpos pos);
49 void print_pdf_matrix(PDF pdf, pdffloat * tm);
50 
51 #endif
52