summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_editimg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_editimg.cpp')
-rw-r--r--fpdfsdk/fpdf_editimg.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editimg.cpp b/fpdfsdk/fpdf_editimg.cpp
index af4d125db0..21ed434d7f 100644
--- a/fpdfsdk/fpdf_editimg.cpp
+++ b/fpdfsdk/fpdf_editimg.cpp
@@ -118,6 +118,28 @@ FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
}
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFImageObj_GetMatrix(FPDF_PAGEOBJECT image_object,
+ double* a,
+ double* b,
+ double* c,
+ double* d,
+ double* e,
+ double* f) {
+ CPDF_ImageObject* pImgObj = CPDFImageObjectFromFPDFPageObject(image_object);
+ if (!pImgObj || !a || !b || !c || !d || !e || !f)
+ return false;
+
+ const CFX_Matrix& matrix = pImgObj->matrix();
+ *a = matrix.a;
+ *b = matrix.b;
+ *c = matrix.c;
+ *d = matrix.d;
+ *e = matrix.e;
+ *f = matrix.f;
+ return true;
+}
+
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
double a,
double b,