From c765d2ac867611935cff6b5c5a2ff8575fe85162 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 19 Jun 2018 15:45:42 +0000 Subject: Add FPDFText_GetMatrix() API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar to FPDFPath_GetMatrix(), but works on text, not path objects. Change-Id: If268362b7fa4398124b953e0e2225074523f5f65 Reviewed-on: https://pdfium-review.googlesource.com/35434 Reviewed-by: dsinclair Reviewed-by: Nicolás Peña Moreno Commit-Queue: Nicolás Peña Moreno --- public/fpdf_edit.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'public') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index d3d7c4b277..6df5e32370 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -1065,6 +1065,31 @@ FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object, unsigned int B, unsigned int A); +// Experimental API. +// Get the transform matrix of a text object. +// +// text - handle to a text. +// a - matrix value. +// b - matrix value. +// c - matrix value. +// d - matrix value. +// e - matrix value. +// f - matrix value. +// +// The matrix is composed as: +// |a c e| +// |b d f| +// and used to scale, rotate, shear and translate the text. +// +// Returns TRUE on success. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetMatrix(FPDF_PAGEOBJECT text, + double* a, + double* b, + double* c, + double* d, + double* e, + double* f); + // Close a loaded PDF font. // // font - Handle to the loaded font. -- cgit v1.2.3