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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfview_c_api_test.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/fpdf_doc.h
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h
index c3be0e05988218274dd68178067e6ee487558f21..d5e99952e5039f23c614451351d2b4407cb4cfbb 100644
--- a/public/fpdf_doc.h
+++ b/public/fpdf_doc.h
@@ -171,6 +171,25 @@ DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document,
DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document,
FPDF_DEST dest);
+// Get the (x, y, zoom) location of |dest| in the destination page, if the
+// destination is in [page /XYZ x y zoom] syntax.
+//
+// dest - handle to the destination.
+// 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.
+// hasY - out parameter; true if the y value is not null
+// hasZoom - out parameter; true if the zoom value is not null
+// x - out parameter; the x coordinate, in the page coordinate system.
+// y - out parameter; the y coordinate, in the page coordinate system.
+// zoom - out parameter; the zoom value.
+// Returns TRUE on successfully reading the /XYZ value.
+DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST dest,
+ FPDF_BOOL* hasX,
+ FPDF_BOOL* hasY,
+ FPDF_BOOL* hasZoom,
+ FS_FLOAT* x,
+ FS_FLOAT* y,
+ FS_FLOAT* zoom);
+
// Find a link at point (|x|,|y|) on |page|.
//
// page - handle to the document page.
« 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