diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-24 17:31:01 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-24 17:31:01 +0000 |
commit | 866d688766dbfc01d69f586bfa197d57df0d9b96 (patch) | |
tree | 4a45f43f095c80ec88f8d8202b3e4e5570563ab9 /fpdfsdk/fpdf_editimg.cpp | |
parent | cd11df62b64655c24d44a65b2a76d723fc214077 (diff) | |
download | pdfium-866d688766dbfc01d69f586bfa197d57df0d9b96.tar.xz |
Implement FPDFImageObj_GetMatrix().
BUG=pdfium:1183
Change-Id: I5b1051d8924264aa12534466ee51b2718b3eca67
Reviewed-on: https://pdfium-review.googlesource.com/c/44514
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editimg.cpp')
-rw-r--r-- | fpdfsdk/fpdf_editimg.cpp | 22 |
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, |