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 "fpdfsdk/include/cpdfsdk_baannot.h" | 7 #include "fpdfsdk/include/cpdfsdk_baannot.h" |
8 | 8 |
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_number.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 ASSERT(rect.right - rect.left >= GetMinWidth()); | 31 ASSERT(rect.right - rect.left >= GetMinWidth()); |
32 ASSERT(rect.top - rect.bottom >= GetMinHeight()); | 32 ASSERT(rect.top - rect.bottom >= GetMinHeight()); |
33 | 33 |
34 m_pAnnot->GetAnnotDict()->SetAtRect("Rect", rect); | 34 m_pAnnot->GetAnnotDict()->SetAtRect("Rect", rect); |
35 } | 35 } |
36 | 36 |
37 CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const { | 37 CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const { |
38 return m_pAnnot->GetRect(); | 38 return m_pAnnot->GetRect(); |
39 } | 39 } |
40 | 40 |
41 CFX_ByteString CPDFSDK_BAAnnot::GetType() const { | 41 CFX_ByteString CPDFSDK_BAAnnot::GetAnnotSubtype() const { |
42 return m_pAnnot->GetSubType(); | 42 return m_pAnnot->GetSubtype(); |
43 } | |
44 | |
45 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const { | |
46 return ""; | |
47 } | 43 } |
48 | 44 |
49 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice, | 45 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice, |
50 const CFX_Matrix* pUser2Device, | 46 const CFX_Matrix* pUser2Device, |
51 CPDF_Annot::AppearanceMode mode, | 47 CPDF_Annot::AppearanceMode mode, |
52 const CPDF_RenderOptions* pOptions) { | 48 const CPDF_RenderOptions* pOptions) { |
53 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, | 49 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, |
54 mode, pOptions); | 50 mode, pOptions); |
55 } | 51 } |
56 | 52 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 return CPDF_Action(); | 389 return CPDF_Action(); |
394 } | 390 } |
395 | 391 |
396 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, | 392 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, |
397 CFX_Matrix* pUser2Device, | 393 CFX_Matrix* pUser2Device, |
398 CPDF_RenderOptions* pOptions) { | 394 CPDF_RenderOptions* pOptions) { |
399 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); | 395 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); |
400 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, | 396 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, |
401 CPDF_Annot::Normal, nullptr); | 397 CPDF_Annot::Normal, nullptr); |
402 } | 398 } |
OLD | NEW |