diff options
author | Lei Zhang <thestig@chromium.org> | 2018-04-12 17:53:15 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-12 17:53:15 +0000 |
commit | a8db06a715cd0090a8c838a7b2861ca3c657f6a2 (patch) | |
tree | abb5cb1ac184b65860ca6469e7b060484638a068 /fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | |
parent | 822886b0c4478eb339fc5e2ec89f3fbdd78d57be (diff) | |
download | pdfium-a8db06a715cd0090a8c838a7b2861ca3c657f6a2.tar.xz |
Change CPDF{XFA}_Page::PageToDevice() to take a CFX_PointF.
Instead of taking two doubles. The doubles get casted to floats anyway.
Change-Id: Ie16dc60fa5d6412026a5fda08c8c64d4fa2d56c4
Reviewed-on: https://pdfium-review.googlesource.com/30410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_page.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index 8fea85d72b..8268ed8759 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -138,16 +138,15 @@ Optional<CFX_PointF> CPDFXFA_Page::DeviceToPage( return pos; } -Optional<CFX_PointF> CPDFXFA_Page::PageToDevice(const FX_RECT& rect, - int rotate, - double page_x, - double page_y) const { +Optional<CFX_PointF> CPDFXFA_Page::PageToDevice( + const FX_RECT& rect, + int rotate, + const CFX_PointF& page_point) const { if (!m_pPDFPage && !m_pXFAPageView) return {}; CFX_Matrix page2device = GetDisplayMatrix(rect, rotate); - return page2device.Transform( - CFX_PointF(static_cast<float>(page_x), static_cast<float>(page_y))); + return page2device.Transform(page_point); } CFX_Matrix CPDFXFA_Page::GetDisplayMatrix(const FX_RECT& rect, |