beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / pdf / pdfxform.h
blobf7f6e54d68f025d81cf47b7b025468348a3c5377
1 /* pdfxform.h
3 Copyright 2009 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
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.
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.
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/>.
22 #ifndef PDFXFORM_H
23 # define PDFXFORM_H
25 # define pdfmem_xform_size 8 /* size of memory in |pdf->mem| which |obj_data_ptr| holds */
27 # define obj_xform_width(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 0]
28 # define obj_xform_height(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 1]
29 # define obj_xform_depth(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 2]
30 # define obj_xform_box(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 3] /* this field holds pointer to the corresponding box */
31 # define obj_xform_attr(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 4] /* additional xform attributes */
32 # define obj_xform_resources(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 5] /* additional xform Resources */
33 # define obj_xform_attr_str(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 6]
34 # define obj_xform_resources_str(pdf,A) pdf->mem[obj_data_ptr(pdf,A) + 7]
36 # define set_pdf_xform_objnum(A,B) pdf_xform_objnum(A)=B
37 # define set_obj_xform_width(pdf,A,B) obj_xform_width(pdf,A)=B
38 # define set_obj_xform_height(pdf,A,B) obj_xform_height(pdf,A)=B
39 # define set_obj_xform_depth(pdf,A,B) obj_xform_depth(pdf,A)=B
40 # define set_obj_xform_box(pdf,A,B) obj_xform_box(pdf,A)=B
41 # define set_obj_xform_attr(pdf,A,B) obj_xform_attr(pdf,A)=B
42 # define set_obj_xform_resources(pdf,A,B) obj_xform_resources(pdf,A)=B
43 # define set_obj_xform_attr_str(pdf,A,B) obj_xform_attr_str(pdf,A)=B
44 # define set_obj_xform_resources_str(pdf,A,B) obj_xform_resources_str(pdf,A)=B
46 extern int pdf_cur_form; /* the form being output */
48 void pdf_place_form(PDF pdf, halfword p);
49 void scan_pdfxform(PDF pdf);
50 void scan_pdfrefxform(PDF pdf);
52 #endif