summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_view.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-12 17:53:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-12 17:53:15 +0000
commita8db06a715cd0090a8c838a7b2861ca3c657f6a2 (patch)
treeabb5cb1ac184b65860ca6469e7b060484638a068 /fpdfsdk/fpdf_view.cpp
parent822886b0c4478eb339fc5e2ec89f3fbdd78d57be (diff)
downloadpdfium-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/fpdf_view.cpp')
-rw-r--r--fpdfsdk/fpdf_view.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index f2fa43f369..cd8edbbdd2 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -771,7 +771,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_PageToDevice(FPDF_PAGE page,
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
const FX_RECT rect(start_x, start_y, start_x + size_x, start_y + size_y);
- Optional<CFX_PointF> pos = pPage->PageToDevice(rect, rotate, page_x, page_y);
+ CFX_PointF page_point(static_cast<float>(page_x), static_cast<float>(page_y));
+ Optional<CFX_PointF> pos = pPage->PageToDevice(rect, rotate, page_point);
if (!pos)
return false;