From 46b437333e53295869afde696ed31043c1f6c717 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 14 Aug 2018 19:15:43 +0000 Subject: Add FPDFFormObj_GetMatrix() API This is similar to FPDFText_GetMatrix() (wrapping CPDF_TextObject::GetTextMatrix()) and FPDFPath_GetMatrix() (wrapping CPDF_PathObject::m_Matrix), but wraps the matrix of form objects: CPDF_FormObject::form_matrix(). Change-Id: Ic4ce7ad8050012f54de356bb936263d3e4f097ca Reviewed-on: https://pdfium-review.googlesource.com/39930 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang Reviewed-by: Henrique Nakashima --- public/fpdf_edit.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'public') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 83fedba905..577ae7fac1 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -1313,6 +1313,32 @@ FPDFFormObj_CountObjects(FPDF_PAGEOBJECT form_object); FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFFormObj_GetObject(FPDF_PAGEOBJECT form_object, unsigned long index); +// Experimental API. +// Get the transform matrix of a form object. +// +// form_object - handle to a form. +// a - pointer to out variable to receive matrix value. +// b - pointer to out variable to receive matrix value. +// c - pointer to out variable to receive matrix value. +// d - pointer to out variable to receive matrix value. +// e - pointer to out variable to receive matrix value. +// f - pointer to out variable to receive matrix value. +// +// The matrix is composed as: +// |a c e| +// |b d f| +// and used to scale, rotate, shear and translate the form object. +// +// Returns TRUE on success. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFFormObj_GetMatrix(FPDF_PAGEOBJECT form_object, + double* a, + double* b, + double* c, + double* d, + double* e, + double* f); + #ifdef __cplusplus } // extern "C" #endif // __cplusplus -- cgit v1.2.3