OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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/include/cpdf_form.h" | 7 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" |
8 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 8 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 if (dwObjNum == 0) { | 37 if (dwObjNum == 0) { |
38 dwObjNum = m_pDocument->AddIndirectObject(pDict); | 38 dwObjNum = m_pDocument->AddIndirectObject(pDict); |
39 CPDF_Reference* pAction = new CPDF_Reference(m_pDocument, dwObjNum); | 39 CPDF_Reference* pAction = new CPDF_Reference(m_pDocument, dwObjNum); |
40 pAnnots->InsertAt(i, pAction); | 40 pAnnots->InsertAt(i, pAction); |
41 pAnnots->RemoveAt(i + 1); | 41 pAnnots->RemoveAt(i + 1); |
42 pDict = pAnnots->GetDictAt(i); | 42 pDict = pAnnots->GetDictAt(i); |
43 } | 43 } |
44 m_AnnotList.push_back( | 44 m_AnnotList.push_back( |
45 std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, this))); | 45 std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, this))); |
46 if (bRegenerateAP && pDict->GetStringBy("Subtype") == "Widget" && | 46 if (bRegenerateAP && pDict->GetStringBy("Subtype") == "Widget" && |
47 CPDF_InterForm::UpdatingAPEnabled()) { | 47 CPDF_InterForm::IsUpdateAPEnabled()) { |
48 FPDF_GenerateAP(m_pDocument, pDict); | 48 FPDF_GenerateAP(m_pDocument, pDict); |
49 } | 49 } |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 CPDF_AnnotList::~CPDF_AnnotList() {} | 53 CPDF_AnnotList::~CPDF_AnnotList() {} |
54 | 54 |
55 void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, | 55 void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, |
56 CFX_RenderDevice* pDevice, | 56 CFX_RenderDevice* pDevice, |
57 CPDF_RenderContext* pContext, | 57 CPDF_RenderContext* pContext, |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 CFX_PathData path; | 346 CFX_PathData path; |
347 width /= 2; | 347 width /= 2; |
348 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, | 348 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, |
349 rect.top - width); | 349 rect.top - width); |
350 int fill_type = 0; | 350 int fill_type = 0; |
351 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { | 351 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { |
352 fill_type |= FXFILL_NOPATHSMOOTH; | 352 fill_type |= FXFILL_NOPATHSMOOTH; |
353 } | 353 } |
354 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); | 354 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); |
355 } | 355 } |
OLD | NEW |