From 1448cc11b9be67d2d1fcd3f2f833cc6f79ad8d42 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 3 Jul 2018 13:52:33 +0000 Subject: 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 Commit-Queue: dsinclair --- public/fpdf_edit.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'public') 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 -- cgit v1.2.3