diff options
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_page.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index 24858f2f1a..87e003e147 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -143,12 +143,10 @@ void CPDFXFA_Page::DeviceToPage(int start_x, if (!m_pPDFPage && !m_pXFAPageView) return; - CFX_Matrix device2page; - device2page.SetReverse( - GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate)); - - CFX_PointF pos = device2page.Transform( - CFX_PointF(static_cast<float>(device_x), static_cast<float>(device_y))); + CFX_PointF pos = GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate) + .GetInverse() + .Transform(CFX_PointF(static_cast<float>(device_x), + static_cast<float>(device_y))); *page_x = pos.x; *page_y = pos.y; |