summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-06-04 14:47:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 14:47:17 +0000
commit97f4d67fbf0707feea298afa2f6471013185e066 (patch)
tree8591d399806c5d441e646a3f879227574e9217b4 /public
parent714bf7821d2de6249d2779424c47027a981d5032 (diff)
downloadpdfium-97f4d67fbf0707feea298afa2f6471013185e066.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h50
1 files changed, 50 insertions, 0 deletions
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.