summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-07-03 13:52:33 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-03 13:52:33 +0000
commit1448cc11b9be67d2d1fcd3f2f833cc6f79ad8d42 (patch)
treea18b7e09d4c1c7fea4e92536727fe86c9f75bae6 /public
parent825f29ce7a61fc5d0ea12c5fd7aaa88984adb965 (diff)
downloadpdfium-1448cc11b9be67d2d1fcd3f2f833cc6f79ad8d42.tar.xz
Add FPDFText_GetTextRenderMode() API
This allows deciding if FPDFPageObj_GetFillColor() or FPDFPageObj_GetStrokeColor() should be used to get the effective color of a text object. Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae Reviewed-on: https://pdfium-review.googlesource.com/36750 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 6e613bca07..6490c18c6a 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -70,6 +70,15 @@
#define FPDF_PRINTMODE_POSTSCRIPT2_PASSTHROUGH 4
#define FPDF_PRINTMODE_POSTSCRIPT3_PASSTHROUGH 5
+#define FPDF_TEXTRENDERMODE_FILL 0
+#define FPDF_TEXTRENDERMODE_STROKE 1
+#define FPDF_TEXTRENDERMODE_FILL_STROKE 2
+#define FPDF_TEXTRENDERMODE_INVISIBLE 3
+#define FPDF_TEXTRENDERMODE_FILL_CLIP 4
+#define FPDF_TEXTRENDERMODE_STROKE_CLIP 5
+#define FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP 6
+#define FPDF_TEXTRENDERMODE_CLIP 7
+
typedef struct FPDF_IMAGEOBJ_METADATA {
// The image width in pixels.
unsigned int width;
@@ -1116,6 +1125,14 @@ FPDFPageObj_CreateTextObj(FPDF_DOCUMENT document,
FPDF_FONT font,
float font_size);
+// Experimental API.
+// Get the text rendering mode of a text object.
+//
+// text - the handle to the text object.
+//
+// Returns one of the FPDF_TEXTRENDERMODE_* flags on success, -1 on error.
+FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetTextRenderMode(FPDF_PAGEOBJECT text);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus