Chromium Code Reviews| Index: fpdfsdk/src/fpdf_flatten.cpp |
| diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp |
| index 3943e9d63609d42a229bd250fba30109f69a1a5c..d92a2ff1c2f5fdea315aa203bfbf73171c27edbf 100644 |
| --- a/fpdfsdk/src/fpdf_flatten.cpp |
| +++ b/fpdfsdk/src/fpdf_flatten.cpp |
| @@ -252,11 +252,9 @@ 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, CFX_Matrix matrix) { |
|
Lei Zhang
2015/12/10 22:34:02
const ref?
Tom Sepez
2015/12/10 22:48:41
Ok. There's a big CL one can cobble up to pass CF
|
| if (rcStream.IsEmpty()) |
| - return CFX_AffineMatrix(); |
| + return CFX_Matrix(); |
| matrix.TransformRect(rcStream); |
| rcStream.Normalize(); |
| @@ -266,7 +264,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 +273,7 @@ void GetOffset(FX_FLOAT& fa, |
| FX_FLOAT& ff, |
| CPDF_Rect rcAnnot, |
| CPDF_Rect rcStream, |
| - CFX_AffineMatrix matrix) { |
| + CFX_Matrix matrix) { |
|
Tom Sepez
2015/12/10 22:48:40
here too.
|
| FX_FLOAT fStreamWidth = 0.0f; |
| FX_FLOAT fStreamHeight = 0.0f; |
| @@ -458,7 +456,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 +504,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; |