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

Unified Diff: fpdfsdk/src/fpdf_flatten.cpp

Issue 1513363002: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 5 years 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 | « fpdfsdk/src/formfiller/FFL_PushButton.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_flatten.cpp
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 3943e9d63609d42a229bd250fba30109f69a1a5c..76ffec3e26edfbbabb94a8a5c300cad4df18aa35 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -252,11 +252,11 @@ void SetPageContents(CFX_ByteString key,
}
}
-CFX_AffineMatrix GetMatrix(CPDF_Rect rcAnnot,
- CPDF_Rect rcStream,
- CFX_AffineMatrix matrix) {
+CFX_Matrix GetMatrix(CPDF_Rect rcAnnot,
+ CPDF_Rect rcStream,
+ const CFX_Matrix& matrix) {
if (rcStream.IsEmpty())
- return CFX_AffineMatrix();
+ return CFX_Matrix();
matrix.TransformRect(rcStream);
rcStream.Normalize();
@@ -266,7 +266,7 @@ CFX_AffineMatrix GetMatrix(CPDF_Rect rcAnnot,
FX_FLOAT e = rcAnnot.left - rcStream.left * a;
FX_FLOAT f = rcAnnot.bottom - rcStream.bottom * d;
- return CFX_AffineMatrix(a, 0, 0, d, e, f);
+ return CFX_Matrix(a, 0, 0, d, e, f);
}
void GetOffset(FX_FLOAT& fa,
@@ -275,7 +275,7 @@ void GetOffset(FX_FLOAT& fa,
FX_FLOAT& ff,
CPDF_Rect rcAnnot,
CPDF_Rect rcStream,
- CFX_AffineMatrix matrix) {
+ const CFX_Matrix& matrix) {
FX_FLOAT fStreamWidth = 0.0f;
FX_FLOAT fStreamHeight = 0.0f;
@@ -458,7 +458,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
continue;
CPDF_Dictionary* pAPDic = pAPStream->GetDict();
- CFX_AffineMatrix matrix = pAPDic->GetMatrix("Matrix");
+ CFX_Matrix matrix = pAPDic->GetMatrix("Matrix");
CPDF_Rect rcStream;
if (pAPDic->KeyExist("Rect"))
@@ -506,7 +506,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
matrix.f = 0.0f;
}
- CFX_AffineMatrix m = GetMatrix(rcAnnot, rcStream, matrix);
+ CFX_Matrix m = GetMatrix(rcAnnot, rcStream, matrix);
sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f,
sFormName.c_str());
sStream += sTemp;
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_PushButton.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698