From 97f4d67fbf0707feea298afa2f6471013185e066 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 4 Jun 2018 14:47:17 +0000 Subject: Add FPDFPath_GetMatrix() and FPDFPath_SetMatrix() APIs This is similar to the existing FPDFImageObj_SetMatrix(), but this exposes the matrix of CPDF_PathObject and provides both a getter and a setter. Change-Id: Ib90a64929dae1b2be3889eca57e4af822d7823be Reviewed-on: https://pdfium-review.googlesource.com/33670 Reviewed-by: dsinclair Commit-Queue: dsinclair --- public/fpdf_edit.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'public') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 8cb97eed15..338b42b588 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -941,6 +941,56 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetDrawMode(FPDF_PAGEOBJECT path, int* fillmode, FPDF_BOOL* stroke); +// Experimental API. +// Get the transform matrix of a path. +// +// path - handle to a path. +// 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 path. +// +// Returns TRUE on success. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetMatrix(FPDF_PAGEOBJECT path, + double* a, + double* b, + double* c, + double* d, + double* e, + double* f); + +// Experimental API. +// Set the transform matrix of a path. +// +// path - handle to a path. +// 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 can be used to scale, rotate, shear and translate the path. +// +// Returns TRUE on success. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetMatrix(FPDF_PAGEOBJECT path, + double a, + double b, + double c, + double d, + double e, + double f); + // Create a new text object using one of the standard PDF fonts. // // document - handle to the document. -- cgit v1.2.3