From 56cc5c12a7f569f218c44a6186cdc3676ea0793b Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 12 Apr 2018 16:35:49 +0000 Subject: Add CPDF_Page::DeviceToPage() / PageToDevice(). Just like CPDFXFA_Page. Also mark the methods const. Change-Id: I6717b4b61a29663780f45bf872f76fe8e671df75 Reviewed-on: https://pdfium-review.googlesource.com/30132 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 4 ++-- fpdfsdk/fpdfxfa/cpdfxfa_page.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/fpdfxfa') diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index c3d5e18707..d4a6d95574 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -130,7 +130,7 @@ void CPDFXFA_Page::DeviceToPage(const FX_RECT& rect, int rotate, const CFX_PointF& device_point, double* page_x, - double* page_y) { + double* page_y) const { if (!m_pPDFPage && !m_pXFAPageView) return; @@ -145,7 +145,7 @@ void CPDFXFA_Page::PageToDevice(const FX_RECT& rect, double page_x, double page_y, int* device_x, - int* device_y) { + int* device_y) const { if (!m_pPDFPage && !m_pXFAPageView) return; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.h b/fpdfsdk/fpdfxfa/cpdfxfa_page.h index 0acec981c6..aef1b0b539 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.h @@ -42,13 +42,13 @@ class CPDFXFA_Page : public Retainable { int rotate, const CFX_PointF& device_point, double* page_x, - double* page_y); + double* page_y) const; void PageToDevice(const FX_RECT& rect, int rotate, double page_x, double page_y, int* device_x, - int* device_y); + int* device_y) const; CFX_Matrix GetDisplayMatrix(const FX_RECT& rect, int iRotate) const; -- cgit v1.2.3