diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-08 06:55:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-08 06:55:40 -0800 |
commit | c59fa8895fa6fa8428b9b278eee6f05478ab8f56 (patch) | |
tree | 3216ee06e894144d578c07e5c655b7637bb6c59c /public/fpdf_doc.h | |
parent | 3c669a7fb05dfb602992a5d2333081daef6f002f (diff) | |
download | pdfium-c59fa8895fa6fa8428b9b278eee6f05478ab8f56.tar.xz |
Add FPDFDest_GetLocationInPage API
Add an API to get the value of the /XYZ destination parameter.
This CL was originally from https://codereview.chromium.org/1960193003/ by
halcanary@.
Review-Url: https://codereview.chromium.org/2481743004
Diffstat (limited to 'public/fpdf_doc.h')
-rw-r--r-- | public/fpdf_doc.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h index c3be0e0598..206dc37a27 100644 --- a/public/fpdf_doc.h +++ b/public/fpdf_doc.h @@ -171,6 +171,28 @@ 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. +// hasXVal - out parameter; true if the x value is not null +// hasYVal - out parameter; true if the y value is not null +// hasZoomVal - out parameter; true if the zoom value is not null +// x - out parameter; the x coordinate, in page coordinates. +// y - out parameter; the y coordinate, in page coordinates. +// zoom - out parameter; the zoom value. +// Returns TRUE on successfully reading the /XYZ value. +// +// Note the [x, y, zoom] values are only set if the corresponding hasXVal, +// hasYVal or hasZoomVal flags are true. +DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST dest, + FPDF_BOOL* hasXCoord, + FPDF_BOOL* hasYCoord, + 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. |