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

Side by Side Diff: public/fpdf_doc.h

Issue 2481743004: Add FPDFDest_GetLocationInPage API (Closed)
Patch Set: Review feedback Created 4 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 | « fpdfsdk/fpdfview_c_api_test.c ('k') | no next file » | 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_DOC_H_ 7 #ifndef PUBLIC_FPDF_DOC_H_
8 #define PUBLIC_FPDF_DOC_H_ 8 #define PUBLIC_FPDF_DOC_H_
9 9
10 #include "fpdfview.h" 10 #include "fpdfview.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 // Get the page index of |dest|. 165 // Get the page index of |dest|.
166 // 166 //
167 // document - handle to the document. 167 // document - handle to the document.
168 // dest - handle to the destination. 168 // dest - handle to the destination.
169 // 169 //
170 // Returns the page index containing |dest|. Page indices start from 0. 170 // Returns the page index containing |dest|. Page indices start from 0.
171 DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, 171 DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document,
172 FPDF_DEST dest); 172 FPDF_DEST dest);
173 173
174 // Get the (x, y, zoom) location of |dest| in the destination page, if the
175 // destination is in [page /XYZ x y zoom] syntax.
176 //
177 // dest - handle to the destination.
178 // hasX - out parameter; true if the x value is not null
Lei Zhang 2016/11/07 22:04:17 Still a little ambiguous, as "x" can refer to eith
dsinclair 2016/11/08 14:04:46 Done.
179 // hasY - out parameter; true if the y value is not null
180 // hasZoom - out parameter; true if the zoom value is not null
181 // x - out parameter; the x coordinate, in the page coordinate system.
182 // y - out parameter; the y coordinate, in the page coordinate system.
183 // zoom - out parameter; the zoom value.
184 // Returns TRUE on successfully reading the /XYZ value.
185 DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST dest,
186 FPDF_BOOL* hasX,
187 FPDF_BOOL* hasY,
188 FPDF_BOOL* hasZoom,
189 FS_FLOAT* x,
190 FS_FLOAT* y,
191 FS_FLOAT* zoom);
192
174 // Find a link at point (|x|,|y|) on |page|. 193 // Find a link at point (|x|,|y|) on |page|.
175 // 194 //
176 // page - handle to the document page. 195 // page - handle to the document page.
177 // x - the x coordinate, in the page coordinate system. 196 // x - the x coordinate, in the page coordinate system.
178 // y - the y coordinate, in the page coordinate system. 197 // y - the y coordinate, in the page coordinate system.
179 // 198 //
180 // Returns a handle to the link, or NULL if no link found at the given point. 199 // Returns a handle to the link, or NULL if no link found at the given point.
181 // 200 //
182 // You can convert coordinates from screen coordinates to page coordinates using 201 // You can convert coordinates from screen coordinates to page coordinates using
183 // |FPDF_DeviceToPage|. 202 // |FPDF_DeviceToPage|.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, 295 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc,
277 FPDF_BYTESTRING tag, 296 FPDF_BYTESTRING tag,
278 void* buffer, 297 void* buffer,
279 unsigned long buflen); 298 unsigned long buflen);
280 299
281 #ifdef __cplusplus 300 #ifdef __cplusplus
282 } // extern "C" 301 } // extern "C"
283 #endif // __cplusplus 302 #endif // __cplusplus
284 303
285 #endif // PUBLIC_FPDF_DOC_H_ 304 #endif // PUBLIC_FPDF_DOC_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfview_c_api_test.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698