Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: fpdfsdk/fpdfeditimg.cpp

Issue 2514263003: Make CPDF_ImageObject::m_Matrix private. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/render/fpdf_render_image.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfeditimg.cpp
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
index e256f85c0fb6c616c1cb6880aeeca54eac32843b..237f45751eee2b77d5a6181b21207ca414ff6bb3 100644
--- a/fpdfsdk/fpdfeditimg.cpp
+++ b/fpdfsdk/fpdfeditimg.cpp
@@ -55,12 +55,10 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
return false;
CPDF_ImageObject* pImgObj = reinterpret_cast<CPDF_ImageObject*>(image_object);
- pImgObj->m_Matrix.a = static_cast<FX_FLOAT>(a);
- pImgObj->m_Matrix.b = static_cast<FX_FLOAT>(b);
- pImgObj->m_Matrix.c = static_cast<FX_FLOAT>(c);
- pImgObj->m_Matrix.d = static_cast<FX_FLOAT>(d);
- pImgObj->m_Matrix.e = static_cast<FX_FLOAT>(e);
- pImgObj->m_Matrix.f = static_cast<FX_FLOAT>(f);
+ CFX_Matrix matrix(static_cast<FX_FLOAT>(a), static_cast<FX_FLOAT>(b),
+ static_cast<FX_FLOAT>(c), static_cast<FX_FLOAT>(d),
+ static_cast<FX_FLOAT>(e), static_cast<FX_FLOAT>(f));
+ pImgObj->set_matrix(matrix);
Tom Sepez 2016/11/21 21:53:00 nit: maybe just pImgObj->set_matrix(CFX_Matrix(...
Lei Zhang 2016/11/21 22:03:53 Done. It wasn't as ugly as I thought it would be.
pImgObj->CalcBoundingBox();
return true;
}
« no previous file with comments | « core/fpdfapi/render/fpdf_render_image.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698