diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-01-16 16:39:05 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-16 16:39:05 +0000 |
commit | 2615590b040a2d49413be41cad298e242d1072e8 (patch) | |
tree | e4c084d34019b6fd576005ca6f3d352a25b04961 /public | |
parent | 2056fac754e679baea695390854fe7b0ce7acb28 (diff) | |
download | pdfium-2615590b040a2d49413be41cad298e242d1072e8.tar.xz |
Add FPDF_GetPageBoundingBox API.chromium/3323
This API returns the intersection of the media box and the crop box
of a page.
Bug: pdfium:973
Change-Id: I57a19ee526ea6d4cd621e1ad6019e51f69f92308
Reviewed-on: https://pdfium-review.googlesource.com/22810
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdfview.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/public/fpdfview.h b/public/fpdfview.h index 0898ec6770..ffa4678347 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h @@ -554,6 +554,19 @@ FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageWidth(FPDF_PAGE page); // One point is 1/72 inch (around 0.3528 mm) FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageHeight(FPDF_PAGE page); +// Experimental API. +// Function: FPDF_GetPageBoundingBox +// Get the bounding box of the page. This is the intersection between +// its media box and its crop box. +// Parameters: +// page - Handle to the page. Returned by FPDF_LoadPage. +// rect - Pointer to a rect to receive the page bounding box. +// On an error, |rect| won't be filled. +// Return value: +// True for success. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_GetPageBoundingBox(FPDF_PAGE page, + FS_RECTF* rect); + // Function: FPDF_GetPageSizeByIndex // Get the size of the page at the given index. // Parameters: |