Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: public/fpdf_transformpage.h

Issue 1465723002: Make XFA public more closely match master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: spacing Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « public/fpdf_text.h ('k') | public/fpdfview.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef PUBLIC_FPDF_TRANSFORMPAGE_H_ 7 #ifndef PUBLIC_FPDF_TRANSFORMPAGE_H_
8 #define PUBLIC_FPDF_TRANSFORMPAGE_H_ 8 #define PUBLIC_FPDF_TRANSFORMPAGE_H_
9 9
10 #include "fpdfview.h" 10 #include "fpdfview.h"
11 11
12 #ifdef __cplusplus 12 #ifdef __cplusplus
13 extern "C" { 13 extern "C" {
14 #endif 14 #endif
15 15
16 typedef void* FPDF_PAGEARCSAVER; 16 typedef void* FPDF_PAGEARCSAVER;
17 typedef void* FPDF_PAGEARCLOADER; 17 typedef void* FPDF_PAGEARCLOADER;
18 18
19 /** 19 /**
20 * Set "MediaBox" entry to the page dictionary. 20 * Set "MediaBox" entry to the page dictionary.
21 * @param[in] page - Handle to a page. 21 * @param[in] page - Handle to a page.
22 * @param[in] left - The left of the rectangle. 22 * @param[in] left - The left of the rectangle.
23 * @param[in] bottom - The bottom of the rectangle. 23 * @param[in] bottom - The bottom of the rectangle.
24 * @param[in] right - The right of the rectangle. 24 * @param[in] right - The right of the rectangle.
25 * @param[in] top - The top of the rectangle. 25 * @param[in] top - The top of the rectangle.
26 * @retval None. 26 * @retval None.
27 * @note The method can not support to set this feature for the document which
28 * consists of dynamic XFA fields.
29 */ 27 */
30 DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page, 28 DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page,
31 float left, 29 float left,
32 float bottom, 30 float bottom,
33 float right, 31 float right,
34 float top); 32 float top);
35 33
36 /** 34 /**
37 * Set "CropBox" entry to the page dictionary. 35 * Set "CropBox" entry to the page dictionary.
38 * @param[in] page - Handle to a page. 36 * @param[in] page - Handle to a page.
39 * @param[in] left - The left of the rectangle. 37 * @param[in] left - The left of the rectangle.
40 * @param[in] bottom - The bottom of the rectangle. 38 * @param[in] bottom - The bottom of the rectangle.
41 * @param[in] right - The right of the rectangle. 39 * @param[in] right - The right of the rectangle.
42 * @param[in] top - The top of the rectangle. 40 * @param[in] top - The top of the rectangle.
43 * @retval None. 41 * @retval None.
44 * @note The method can not support to set this feature for the document which
45 * consists of dynamic XFA fields.
46 */ 42 */
47 DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page, 43 DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page,
48 float left, 44 float left,
49 float bottom, 45 float bottom,
50 float right, 46 float right,
51 float top); 47 float top);
52 48
53 /** Get "MediaBox" entry from the page dictionary. 49 /** Get "MediaBox" entry from the page dictionary.
54 * @param[in] page - Handle to a page. 50 * @param[in] page - Handle to a page.
55 * @param[in] left - Pointer to a double value receiving the left of the 51 * @param[in] left - Pointer to a double value receiving the left of the
56 * rectangle. 52 * rectangle.
57 * @param[in] bottom - Pointer to a double value receiving the bottom of the 53 * @param[in] bottom - Pointer to a double value receiving the bottom of the
58 * rectangle. 54 * rectangle.
59 * @param[in] right - Pointer to a double value receiving the right of the 55 * @param[in] right - Pointer to a double value receiving the right of the
60 * rectangle. 56 * rectangle.
61 * @param[in] top - Pointer to a double value receiving the top of the 57 * @param[in] top - Pointer to a double value receiving the top of the
62 * rectangle. 58 * rectangle.
63 * @retval True if success,else fail. 59 * @retval True if success,else fail.
64 * @note The method can not support to get this feature for the document which
65 * consists of dynamic XFA fields.
66 */ 60 */
67 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page, 61 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page,
68 float* left, 62 float* left,
69 float* bottom, 63 float* bottom,
70 float* right, 64 float* right,
71 float* top); 65 float* top);
72 66
73 /** Get "CropBox" entry from the page dictionary. 67 /** Get "CropBox" entry from the page dictionary.
74 * @param[in] page - Handle to a page. 68 * @param[in] page - Handle to a page.
75 * @param[in] left - Pointer to a double value receiving the left of the 69 * @param[in] left - Pointer to a double value receiving the left of the
76 * rectangle. 70 * rectangle.
77 * @param[in] bottom - Pointer to a double value receiving the bottom of the 71 * @param[in] bottom - Pointer to a double value receiving the bottom of the
78 * rectangle. 72 * rectangle.
79 * @param[in] right - Pointer to a double value receiving the right of the 73 * @param[in] right - Pointer to a double value receiving the right of the
80 * rectangle. 74 * rectangle.
81 * @param[in] top - Pointer to a double value receiving the top of the 75 * @param[in] top - Pointer to a double value receiving the top of the
82 * rectangle. 76 * rectangle.
83 * @retval True if success,else fail. 77 * @retval True if success,else fail.
84 * @note The method can not support to get this feature for the document which
85 * consists of dynamic XFA fields.
86 */ 78 */
87 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page, 79 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page,
88 float* left, 80 float* left,
89 float* bottom, 81 float* bottom,
90 float* right, 82 float* right,
91 float* top); 83 float* top);
92 84
93 /** 85 /**
94 * Transform the whole page with a specified matrix, then clip the page content 86 * Transform the whole page with a specified matrix, then clip the page content
95 * region. 87 * region.
96 * 88 *
97 * @param[in] page - A page handle. 89 * @param[in] page - A page handle.
98 * @param[in] matrix - The transform matrix. 90 * @param[in] matrix - The transform matrix.
99 * @param[in] clipRect - A rectangle page area to be clipped. 91 * @param[in] clipRect - A rectangle page area to be clipped.
100 * @Note. This function will transform the whole page, and would take effect to 92 * @Note. This function will transform the whole page, and would take effect to
101 * all the objects in the page. 93 * all the objects in the page.
102 * The method can not support to get this feature for the document which
103 * consists of dynamic XFA fields.
104 */ 94 */
105 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, 95 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
106 FS_MATRIX* matrix, 96 FS_MATRIX* matrix,
107 FS_RECTF* clipRect); 97 FS_RECTF* clipRect);
108 98
109 /** 99 /**
110 * Transform (scale, rotate, shear, move) the clip path of page object. 100 * Transform (scale, rotate, shear, move) the clip path of page object.
111 * @param[in] page_object - Handle to a page object. Returned by 101 * @param[in] page_object - Handle to a page object. Returned by
112 * FPDFPageObj_NewImageObj. 102 * FPDFPageObj_NewImageObj.
113 * @param[in] a - The coefficient "a" of the matrix. 103 * @param[in] a - The coefficient "a" of the matrix.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath); 141 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath);
152 142
153 /** 143 /**
154 * Clip the page content, the page content that outside the clipping region 144 * Clip the page content, the page content that outside the clipping region
155 * become invisible. 145 * become invisible.
156 * 146 *
157 * @param[in] page - A page handle. 147 * @param[in] page - A page handle.
158 * @param[in] clipPath - A handle to the clip path. 148 * @param[in] clipPath - A handle to the clip path.
159 * @Note. A clip path will be inserted before the page content stream or content 149 * @Note. A clip path will be inserted before the page content stream or content
160 * array. In this way, the page content will be clipped 150 * array. In this way, the page content will be clipped
161 * by this clip path. The method can not support this feature for the document 151 * by this clip path.
162 * consists of dynamic XFA fields.
163 */ 152 */
164 DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page, 153 DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,
165 FPDF_CLIPPATH clipPath); 154 FPDF_CLIPPATH clipPath);
166 155
167 #ifdef __cplusplus 156 #ifdef __cplusplus
168 } 157 }
169 #endif 158 #endif
170 159
171 #endif // PUBLIC_FPDF_TRANSFORMPAGE_H_ 160 #endif // PUBLIC_FPDF_TRANSFORMPAGE_H_
OLDNEW
« no previous file with comments | « public/fpdf_text.h ('k') | public/fpdfview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698