Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: fpdfsdk/fpdfxfa/fpdfxfa_page.h

Issue 2385423004: Rename fpdfsdk/fpdfxfa files to match contents (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef FPDFSDK_FPDFXFA_FPDFXFA_PAGE_H_
8 #define FPDFSDK_FPDFXFA_FPDFXFA_PAGE_H_
9
10 #include <memory>
11
12 #include "core/fxcrt/fx_system.h"
13
14 class CFX_Matrix;
15 class CPDFXFA_Document;
16 class CPDF_Dictionary;
17 class CPDF_Page;
18 class CXFA_FFPageView;
19
20 class CPDFXFA_Page {
21 public:
22 CPDFXFA_Page(CPDFXFA_Document* pDoc, int page_index);
23
24 void Retain() { m_iRef++; }
25 void Release() {
26 if (--m_iRef <= 0)
27 delete this;
28 }
29
30 FX_BOOL LoadPage();
31 FX_BOOL LoadPDFPage(CPDF_Dictionary* pageDict);
32 CPDFXFA_Document* GetDocument() const { return m_pDocument; }
33 int GetPageIndex() const { return m_iPageIndex; }
34 CPDF_Page* GetPDFPage() const { return m_pPDFPage.get(); }
35 CXFA_FFPageView* GetXFAPageView() const { return m_pXFAPageView; }
36
37 void SetXFAPageView(CXFA_FFPageView* pPageView) {
38 m_pXFAPageView = pPageView;
39 }
40
41 FX_FLOAT GetPageWidth() const;
42 FX_FLOAT GetPageHeight() const;
43
44 void DeviceToPage(int start_x,
45 int start_y,
46 int size_x,
47 int size_y,
48 int rotate,
49 int device_x,
50 int device_y,
51 double* page_x,
52 double* page_y);
53 void PageToDevice(int start_x,
54 int start_y,
55 int size_x,
56 int size_y,
57 int rotate,
58 double page_x,
59 double page_y,
60 int* device_x,
61 int* device_y);
62
63 void GetDisplayMatrix(CFX_Matrix& matrix,
64 int xPos,
65 int yPos,
66 int xSize,
67 int ySize,
68 int iRotate) const;
69
70 protected:
71 // Refcounted class.
72 ~CPDFXFA_Page();
73
74 FX_BOOL LoadPDFPage();
75 FX_BOOL LoadXFAPageView();
76
77 private:
78 std::unique_ptr<CPDF_Page> m_pPDFPage;
79 CXFA_FFPageView* m_pXFAPageView;
80 CPDFXFA_Document* const m_pDocument;
81 const int m_iPageIndex;
82 int m_iRef;
83 };
84
85 #endif // FPDFSDK_FPDFXFA_FPDFXFA_PAGE_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698