From afb44560a21298b3588b36cbaf45e2be50f2e75b Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 9 Feb 2017 13:07:43 -0500 Subject: Remove Transform in favour of TransformPoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'fpdfsdk/fpdfxfa') 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(device_x), - static_cast(device_y), page_x_f, page_y_f); + + FX_FLOAT page_x_f = static_cast(device_x); + FX_FLOAT page_y_f = static_cast(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(page_x), - static_cast(page_y), device_x_f, device_y_f); + + FX_FLOAT device_x_f = static_cast(page_x); + FX_FLOAT device_y_f = static_cast(page_y); + page2device.TransformPoint(device_x_f, device_y_f); *device_x = FXSYS_round(device_x_f); *device_y = FXSYS_round(device_y_f); -- cgit v1.2.3