diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-14 19:15:43 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-14 19:15:43 +0000 |
commit | 46b437333e53295869afde696ed31043c1f6c717 (patch) | |
tree | 25c8b199bd5b601d18c1c87f8e20bae9c8510c50 /public/fpdf_edit.h | |
parent | 9e4a66449a227ca2a9e62d2f83fdc35f11bb5e2d (diff) | |
download | pdfium-46b437333e53295869afde696ed31043c1f6c717.tar.xz |
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 <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'public/fpdf_edit.h')
-rw-r--r-- | public/fpdf_edit.h | 26 |
1 files changed, 26 insertions, 0 deletions
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 |