summaryrefslogtreecommitdiff
path: root/public/fpdf_text.h
diff options
context:
space:
mode:
authorAndrew Weintraub <asweintraub@google.com>2017-08-11 11:36:51 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-12 00:29:04 +0000
commitd3002340caad8d688d0e4928a36e90d354a797bd (patch)
treee87182d51b22e04ae553354655a061d9d099b1b7 /public/fpdf_text.h
parent3c03439a81731233a5410fa4ea029721c021d42c (diff)
downloadpdfium-d3002340caad8d688d0e4928a36e90d354a797bd.tar.xz
Add a new public method to get the the origin of a character.
Bug: Change-Id: I376f4af26791cd4ed04049ab179c2b39dd262725 Reviewed-on: https://pdfium-review.googlesource.com/10690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'public/fpdf_text.h')
-rw-r--r--public/fpdf_text.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/public/fpdf_text.h b/public/fpdf_text.h
index c069144026..4a76a7fcd0 100644
--- a/public/fpdf_text.h
+++ b/public/fpdf_text.h
@@ -113,6 +113,27 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
double* bottom,
double* top);
+// Function: FPDFText_GetCharOrigin
+// Get origin of a particular character.
+// Parameters:
+// text_page - Handle to a text page information structure.
+// Returned by FPDFText_LoadPage function.
+// index - Zero-based index of the character.
+// x - Pointer to a double number receiving x coordinate of
+// the character origin.
+// y - Pointer to a double number receiving y coordinate of
+// the character origin.
+// Return Value:
+// Whether the call succeeded. If false, x and y are unchanged.
+// Comments:
+// All positions are measured in PDF "user space".
+//
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFText_GetCharOrigin(FPDF_TEXTPAGE text_page,
+ int index,
+ double* x,
+ double* y);
+
// Function: FPDFText_GetCharIndexAtPos
// Get the index of a character at or nearby a certain position on the
// page.