diff options
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/fpdfview.cpp | 16 |
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 |