summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 13:07:43 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 19:02:55 +0000
commitafb44560a21298b3588b36cbaf45e2be50f2e75b (patch)
tree21f3ececad017e6be64a19c4370cfe9fd7f9c29c /fpdfsdk/fpdfview.cpp
parent67e4faaf8be0aebc67ebfb96d33933d9f9119d20 (diff)
downloadpdfium-afb44560a21298b3588b36cbaf45e2be50f2e75b.tar.xz
Remove Transform in favour of TransformPoint
This CL removes the two Transform() overrides from CFX_Matrix and calls the TransformPoint methods directly. In the case of the 4 param version the values were assigned to the out values before calling. Change-Id: Id633826caec75b848774dcda6cfdcef2dbf5a7db Reviewed-on: https://pdfium-review.googlesource.com/2573 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 2c2f25ab0b..57d5d4d343 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -855,10 +855,10 @@ DLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page,
CFX_Matrix device2page;
device2page.SetReverse(page2device);
- FX_FLOAT page_x_f;
- FX_FLOAT page_y_f;
- device2page.Transform(static_cast<FX_FLOAT>(device_x),
- static_cast<FX_FLOAT>(device_y), page_x_f, page_y_f);
+ FX_FLOAT page_x_f = static_cast<FX_FLOAT>(device_x);
+ FX_FLOAT page_y_f = static_cast<FX_FLOAT>(device_y);
+ device2page.TransformPoint(page_x_f, page_y_f);
+
*page_x = page_x_f;
*page_y = page_y_f;
#endif // PDF_ENABLE_XFA
@@ -885,10 +885,10 @@ DLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page,
#else // PDF_ENABLE_XFA
CFX_Matrix page2device =
pPage->GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate);
- FX_FLOAT device_x_f;
- FX_FLOAT device_y_f;
- page2device.Transform(static_cast<FX_FLOAT>(page_x),
- static_cast<FX_FLOAT>(page_y), device_x_f, device_y_f);
+ FX_FLOAT device_x_f = static_cast<FX_FLOAT>(page_x);
+ FX_FLOAT device_y_f = static_cast<FX_FLOAT>(page_y);
+ page2device.TransformPoint(device_x_f, device_y_f);
+
*device_x = FXSYS_round(device_x_f);
*device_y = FXSYS_round(device_y_f);
#endif // PDF_ENABLE_XFA