diff options
author | Lei Zhang <thestig@chromium.org> | 2018-04-12 16:35:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-12 16:35:49 +0000 |
commit | 56cc5c12a7f569f218c44a6186cdc3676ea0793b (patch) | |
tree | fd03d43e9e59d28554d7169f319f421dad6f8832 /core/fpdfapi/page/cpdf_page.h | |
parent | a105fa126cfc2de661dca824bd307aa329e22c9d (diff) | |
download | pdfium-56cc5c12a7f569f218c44a6186cdc3676ea0793b.tar.xz |
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 <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_page.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_page.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_page.h b/core/fpdfapi/page/cpdf_page.h index 39c1b72c27..d199ea41db 100644 --- a/core/fpdfapi/page/cpdf_page.h +++ b/core/fpdfapi/page/cpdf_page.h @@ -33,6 +33,18 @@ class CPDF_Page : public CPDF_PageObjectHolder { void ParseContent(); + void DeviceToPage(const FX_RECT& rect, + int rotate, + const CFX_PointF& device_point, + double* page_x, + double* page_y) const; + void PageToDevice(const FX_RECT& rect, + int rotate, + double page_x, + double page_y, + int* device_x, + int* device_y) const; + CFX_Matrix GetDisplayMatrix(const FX_RECT& rect, int iRotate) const; float GetPageWidth() const { return m_PageSize.width; } |