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

Side by Side Diff: fpdfsdk/include/fpdf_transformpage.h

Issue 1136703003: Merge to XFA: Create top-level public/ header directory. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 7 months 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 | « fpdfsdk/include/fpdf_sysfontinfo.h ('k') | fpdfsdk/include/fpdfdoc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef _TRANSFORMPAGE_H_
8 #define _TRANSFORMPAGE_H_
9
10 #ifndef _FPDFVIEW_H_
11 #include "fpdfview.h"
12 #endif
13
14 typedef void* FPDF_PAGEARCSAVER;
15 typedef void* FPDF_PAGEARCLOADER;
16 /**
17 * Set "MediaBox" entry to the page dictionary.
18 * @param[in] page - Handle to a page.
19 * @param[in] left - The left of the rectangle.
20 * @param[in] bottom - The bottom of the rectangle.
21 * @param[in] right - The right of the rectangle.
22 * @param[in] top - The top of the rectangle.
23 * @retval None.
24 * @note The method can not support to set this feature for the document which co nsists of dynamic XFA fields.
25 */
26 DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page, float left, float bo ttom, float right, float top);
27
28 /**
29 * Set "CropBox" entry to the page dictionary.
30 * @param[in] page - Handle to a page.
31 * @param[in] left - The left of the rectangle.
32 * @param[in] bottom - The bottom of the rectangle.
33 * @param[in] right - The right of the rectangle.
34 * @param[in] top - The top of the rectangle.
35 * @retval None.
36 * @note The method can not support to set this feature for the document which co nsists of dynamic XFA fields.
37 */
38 DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page, float left, float bot tom, float right, float top);
39
40
41 /** Get "MediaBox" entry from the page dictionary.
42 * @param[in] page - Handle to a page.
43 * @param[in] left - Pointer to a double value receiving the left of the re ctangle.
44 * @param[in] bottom - Pointer to a double value receiving the bottom of the rectangle.
45 * @param[in] right - Pointer to a double value receiving the right of the r ectangle.
46 * @param[in] top - Pointer to a double value receiving the top of the rec tangle.
47 * @retval True if success,else fail.
48 * @note The method can not support to get this feature for the document which co nsists of dynamic XFA fields.
49 */
50 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page, float* left, fl oat* bottom, float* right, float* top);
51
52 /** Get "CropBox" entry from the page dictionary.
53 * @param[in] page - Handle to a page.
54 * @param[in] left - Pointer to a double value receiving the left of the re ctangle.
55 * @param[in] bottom - Pointer to a double value receiving the bottom of the rectangle.
56 * @param[in] right - Pointer to a double value receiving the right of the r ectangle.
57 * @param[in] top - Pointer to a double value receiving the top of the rec tangle.
58 * @retval True if success,else fail.
59 * @note The method can not support to get this feature for the document which co nsists of dynamic XFA fields.
60 */
61 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page, float* left, flo at* bottom, float* right, float* top);
62
63 /**
64 * Transform the whole page with a specified matrix, then clip the page content r egion.
65 *
66 * @param[in] page - A page handle.
67 * @param[in] matrix - The transform matrix.
68 * @param[in] clipRect - A rectangle page area to be clipped.
69 * @Note. This function will transform the whole page, and would take effect to a ll the objects in the page.
70 * The method can not support to get this feature for the document which consists of dynamic XFA fields.
71 */
72 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX * matrix, FS_RECTF* clipRect);
73
74 /**
75 * Transform (scale, rotate, shear, move) the clip path of page object.
76 * @param[in] page_object - Handle to a page object. Returned by FPDFPageObj_NewI mageObj.
77 * @param[in] a - The coefficient "a" of the matrix.
78 * @param[in] b - The coefficient "b" of the matrix.
79 * @param[in] c - The coefficient "c" of the matrix.
80 * @param[in] d - The coefficient "d" of the matrix.
81 * @param[in] e - The coefficient "e" of the matrix.
82 * @param[in] f - The coefficient "f" of the matrix.
83 * @retval None.
84 */
85 DLLEXPORT void STDCALL FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object ,double a, double b, double c, double d, double e, double f);
86
87 /**
88 * Create a new clip path, with a rectangle inserted.
89 *
90 * @param[in] left - The left of the clip box.
91 * @param[in] bottom - The bottom of the clip box.
92 * @param[in] right - The right of the clip box.
93 * @param[in] top - The top of the clip box.
94 * @retval a handle to the clip path.
95 */
96 DLLEXPORT FPDF_CLIPPATH STDCALL FPDF_CreateClipPath(float left, float bottom, fl oat right, float top);
97
98 /**
99 * Destroy the clip path.
100 *
101 * @param[in] clipPath - A handle to the clip path.
102 * Destroy the clip path.
103 * @retval None.
104 */
105 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath);
106
107 /**
108 * Clip the page content, the page content that outside the clipping region becom e invisible.
109 *
110 * @param[in] page - A page handle.
111 * @param[in] clipPath - A handle to the clip path.
112 * @Note. A clip path will be inserted before the page content stream or content array. In this way, the page content will be clipped
113 * by this clip path. The method can not support this feature for the document co nsists of dynamic XFA fields.
114 */
115 DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,FPDF_CLIPPATH clip Path);
116
117 #endif
118
OLDNEW
« no previous file with comments | « fpdfsdk/include/fpdf_sysfontinfo.h ('k') | fpdfsdk/include/fpdfdoc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698