diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-10 15:34:55 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-10 15:34:55 -0800 |
commit | 60d909e9d4444b2b8582275624ee97734d331a38 (patch) | |
tree | 6a884e5dd0c785c141919531033de7e2fc5b0e01 /fpdfsdk/src/fpdf_flatten.cpp | |
parent | 33c8c7602f8981c32d37a9b2e25496401e914391 (diff) | |
download | pdfium-60d909e9d4444b2b8582275624ee97734d331a38.tar.xz |
Merge to XFA: Remove CFX_AffineMatrix/CPDF_Matrix
Review URL: https://codereview.chromium.org/1513363002 .
(cherry picked from commit f32c969bce6743fca1e7ff796b54a1692d26d7f0)
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1519693002 .
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_flatten.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp index 3943e9d636..76ffec3e26 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; |