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

Side by Side Diff: public/fpdf_doc.h

Issue 2481743004: Add FPDFDest_GetLocationInPage API (Closed)
Patch Set: 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
« core/fpdfdoc/cpdf_dest.cpp ('K') | « fpdfsdk/fpdfdoc_unittest.cpp ('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 // x - out parameter; the x coordinate, in the page coordinate system.
179 // y - out parameter; the y coordinate, in the page coordinate system.
180 // zoom - out parameter; the zoom value.
181 // Returns TRUE on success.
Lei Zhang 2016/11/07 20:19:20 Better define "success" ?
dsinclair 2016/11/07 21:49:18 Done.
182 DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST dest,
183 FPDF_BOOL* hasX,
Lei Zhang 2016/11/07 20:19:20 Document.
dsinclair 2016/11/07 21:49:18 Done.
184 FPDF_BOOL* hasY,
185 FPDF_BOOL* hasZoom,
186 FS_FLOAT* x,
187 FS_FLOAT* y,
188 FS_FLOAT* zoom);
189
174 // Find a link at point (|x|,|y|) on |page|. 190 // Find a link at point (|x|,|y|) on |page|.
175 // 191 //
176 // page - handle to the document page. 192 // page - handle to the document page.
177 // x - the x coordinate, in the page coordinate system. 193 // x - the x coordinate, in the page coordinate system.
178 // y - the y coordinate, in the page coordinate system. 194 // y - the y coordinate, in the page coordinate system.
179 // 195 //
180 // Returns a handle to the link, or NULL if no link found at the given point. 196 // Returns a handle to the link, or NULL if no link found at the given point.
181 // 197 //
182 // You can convert coordinates from screen coordinates to page coordinates using 198 // You can convert coordinates from screen coordinates to page coordinates using
183 // |FPDF_DeviceToPage|. 199 // |FPDF_DeviceToPage|.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, 292 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc,
277 FPDF_BYTESTRING tag, 293 FPDF_BYTESTRING tag,
278 void* buffer, 294 void* buffer,
279 unsigned long buflen); 295 unsigned long buflen);
280 296
281 #ifdef __cplusplus 297 #ifdef __cplusplus
282 } // extern "C" 298 } // extern "C"
283 #endif // __cplusplus 299 #endif // __cplusplus
284 300
285 #endif // PUBLIC_FPDF_DOC_H_ 301 #endif // PUBLIC_FPDF_DOC_H_
OLDNEW
« core/fpdfdoc/cpdf_dest.cpp ('K') | « fpdfsdk/fpdfdoc_unittest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698