diff options
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_page.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index f39a01078e..b708a361e5 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -154,13 +154,13 @@ void CPDFXFA_Page::DeviceToPage(int start_x, if (!m_pPDFPage && !m_pXFAPageView) return; - FX_FLOAT page_x_f, page_y_f; - CFX_Matrix device2page; device2page.SetReverse( GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate)); - 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; @@ -178,13 +178,12 @@ void CPDFXFA_Page::PageToDevice(int start_x, if (!m_pPDFPage && !m_pXFAPageView) return; - FX_FLOAT device_x_f; - FX_FLOAT device_y_f; - CFX_Matrix page2device = GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate); - 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); |