OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fpdfapi/fpdf_page/cpdf_page.h" | 7 #include "core/fpdfapi/page/cpdf_page.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "core/fpdfapi/cpdf_pagerendercontext.h" | 11 #include "core/fpdfapi/cpdf_pagerendercontext.h" |
12 #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" | |
13 #include "core/fpdfapi/fpdf_page/pageint.h" | |
14 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" | 12 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" |
15 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" | 13 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" |
16 #include "core/fpdfapi/fpdf_parser/cpdf_object.h" | 14 #include "core/fpdfapi/fpdf_parser/cpdf_object.h" |
17 #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" | 15 #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" |
| 16 #include "core/fpdfapi/page/cpdf_pageobject.h" |
| 17 #include "core/fpdfapi/page/pageint.h" |
18 #include "third_party/base/stl_util.h" | 18 #include "third_party/base/stl_util.h" |
19 | 19 |
20 CPDF_Page::CPDF_Page(CPDF_Document* pDocument, | 20 CPDF_Page::CPDF_Page(CPDF_Document* pDocument, |
21 CPDF_Dictionary* pPageDict, | 21 CPDF_Dictionary* pPageDict, |
22 bool bPageCache) | 22 bool bPageCache) |
23 : m_PageWidth(100), | 23 : m_PageWidth(100), |
24 m_PageHeight(100), | 24 m_PageHeight(100), |
25 m_pView(nullptr), | 25 m_pView(nullptr), |
26 m_pPageRender(bPageCache ? new CPDF_PageRenderCache(this) : nullptr) { | 26 m_pPageRender(bPageCache ? new CPDF_PageRenderCache(this) : nullptr) { |
27 m_pFormDict = pPageDict; | 27 m_pFormDict = pPageDict; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 y2 = yPos; | 167 y2 = yPos; |
168 break; | 168 break; |
169 } | 169 } |
170 display_matrix.Set( | 170 display_matrix.Set( |
171 ((FX_FLOAT)(x2 - x0)) / m_PageWidth, ((FX_FLOAT)(y2 - y0)) / m_PageWidth, | 171 ((FX_FLOAT)(x2 - x0)) / m_PageWidth, ((FX_FLOAT)(y2 - y0)) / m_PageWidth, |
172 ((FX_FLOAT)(x1 - x0)) / m_PageHeight, | 172 ((FX_FLOAT)(x1 - x0)) / m_PageHeight, |
173 ((FX_FLOAT)(y1 - y0)) / m_PageHeight, (FX_FLOAT)x0, (FX_FLOAT)y0); | 173 ((FX_FLOAT)(y1 - y0)) / m_PageHeight, (FX_FLOAT)x0, (FX_FLOAT)y0); |
174 matrix = m_PageMatrix; | 174 matrix = m_PageMatrix; |
175 matrix.Concat(display_matrix); | 175 matrix.Concat(display_matrix); |
176 } | 176 } |
OLD | NEW |