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/formfiller/FFL_FormFiller.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/formfiller/FFL_FormFiller.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_FormFiller.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp index 6989ed8a23..8b030a51a2 100644 --- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp +++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp @@ -73,12 +73,12 @@ FX_RECT CFFL_FormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, - CPDF_Matrix* pUser2Device, + CFX_Matrix* pUser2Device, FX_DWORD dwFlags) { ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { - CPDF_Matrix mt = GetCurMatrix(); + CFX_Matrix mt = GetCurMatrix(); mt.Concat(*pUser2Device); pWnd->DrawAppearance(pDevice, &mt); } else { @@ -91,7 +91,7 @@ void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, void CFFL_FormFiller::OnDrawDeactive(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, - CPDF_Matrix* pUser2Device, + CFX_Matrix* pUser2Device, FX_DWORD dwFlags) { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); @@ -398,22 +398,22 @@ void CFFL_FormFiller::DestroyPDFWindow(CPDFSDK_PageView* pPageView) { m_Maps.erase(it); } -CPDF_Matrix CFFL_FormFiller::GetWindowMatrix(void* pAttachedData) { +CFX_Matrix CFFL_FormFiller::GetWindowMatrix(void* pAttachedData) { if (CFFL_PrivateData* pPrivateData = (CFFL_PrivateData*)pAttachedData) { if (pPrivateData->pPageView) { - CPDF_Matrix mtPageView; + CFX_Matrix mtPageView; pPrivateData->pPageView->GetCurrentMatrix(mtPageView); - CPDF_Matrix mt = GetCurMatrix(); + CFX_Matrix mt = GetCurMatrix(); mt.Concat(mtPageView); return mt; } } - return CPDF_Matrix(1, 0, 0, 1, 0, 0); + return CFX_Matrix(1, 0, 0, 1, 0, 0); } -CPDF_Matrix CFFL_FormFiller::GetCurMatrix() { - CPDF_Matrix mt; +CFX_Matrix CFFL_FormFiller::GetCurMatrix() { + CFX_Matrix mt; ASSERT(m_pWidget != NULL); @@ -423,17 +423,17 @@ CPDF_Matrix CFFL_FormFiller::GetCurMatrix() { switch (m_pWidget->GetRotate()) { default: case 0: - mt = CPDF_Matrix(1, 0, 0, 1, 0, 0); + mt = CFX_Matrix(1, 0, 0, 1, 0, 0); break; case 90: - mt = CPDF_Matrix(0, 1, -1, 0, rcDA.right - rcDA.left, 0); + mt = CFX_Matrix(0, 1, -1, 0, rcDA.right - rcDA.left, 0); break; case 180: - mt = CPDF_Matrix(-1, 0, 0, -1, rcDA.right - rcDA.left, - rcDA.top - rcDA.bottom); + mt = CFX_Matrix(-1, 0, 0, -1, rcDA.right - rcDA.left, + rcDA.top - rcDA.bottom); break; case 270: - mt = CPDF_Matrix(0, -1, 1, 0, 0, rcDA.top - rcDA.bottom); + mt = CFX_Matrix(0, -1, 1, 0, 0, rcDA.top - rcDA.bottom); break; } mt.e += rcDA.left; @@ -477,7 +477,7 @@ CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) { } CPDF_Rect CFFL_FormFiller::FFLtoPWL(const CPDF_Rect& rect) { - CPDF_Matrix mt; + CFX_Matrix mt; mt.SetReverse(GetCurMatrix()); CPDF_Rect temp = rect; @@ -487,7 +487,7 @@ CPDF_Rect CFFL_FormFiller::FFLtoPWL(const CPDF_Rect& rect) { } CPDF_Rect CFFL_FormFiller::PWLtoFFL(const CPDF_Rect& rect) { - CPDF_Matrix mt = GetCurMatrix(); + CFX_Matrix mt = GetCurMatrix(); CPDF_Rect temp = rect; mt.TransformRect(temp); @@ -496,7 +496,7 @@ CPDF_Rect CFFL_FormFiller::PWLtoFFL(const CPDF_Rect& rect) { } CPDF_Point CFFL_FormFiller::FFLtoPWL(const CPDF_Point& point) { - CPDF_Matrix mt; + CFX_Matrix mt; mt.SetReverse(GetCurMatrix()); CPDF_Point pt = point; @@ -506,7 +506,7 @@ CPDF_Point CFFL_FormFiller::FFLtoPWL(const CPDF_Point& point) { } CPDF_Point CFFL_FormFiller::PWLtoFFL(const CPDF_Point& point) { - CPDF_Matrix mt = GetCurMatrix(); + CFX_Matrix mt = GetCurMatrix(); CPDF_Point pt = point; mt.Transform(pt.x, pt.y); @@ -689,7 +689,7 @@ FX_BOOL CFFL_Button::OnMouseMove(CPDFSDK_PageView* pPageView, void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, - CPDF_Matrix* pUser2Device, + CFX_Matrix* pUser2Device, FX_DWORD dwFlags) { ASSERT(pPageView != NULL); CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; @@ -720,7 +720,7 @@ void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView, void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, - CPDF_Matrix* pUser2Device, + CFX_Matrix* pUser2Device, FX_DWORD dwFlags) { OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); } |