From f1697fa06b9fae75dd1c0782f5a721795cfc4a0c Mon Sep 17 00:00:00 2001 From: wileyrya Date: Fri, 26 May 2017 12:27:40 -0500 Subject: Add public API for getting the bounds of a page object. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG=pdfium:721 R=npm@chromium.org Change-Id: I71b6281346b3ed67f6b8703eccd7794588559819 Reviewed-on: https://pdfium-review.googlesource.com/6013 Commit-Queue: Nicolás Peña Reviewed-by: Nicolás Peña --- public/fpdf_edit.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'public/fpdf_edit.h') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 904231f09f..677bdb28d3 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -296,6 +296,21 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x, float w, float h); +// Get the bounding box of |pageObject|. +// +// pageObject - handle to a page object. +// left - pointer where the left coordinate will be stored +// bottom - pointer where the bottom coordinate will be stored +// right - pointer where the right coordinate will be stored +// top - pointer where the top coordinate will be stored +// +// Returns TRUE on success. +DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT pageObject, + float* left, + float* bottom, + float* right, + float* top); + // Set the stroke RGBA of a path. Range of values: 0 - 255. // // path - the handle to the path object. -- cgit v1.2.3