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 #ifndef CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_ | 7 #ifndef CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_ |
8 #define CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_ | 8 #define CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 static CFX_FloatRect RectFromQuadPoints(CPDF_Dictionary* pAnnotDict); | 74 static CFX_FloatRect RectFromQuadPoints(CPDF_Dictionary* pAnnotDict); |
75 | 75 |
76 CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument, bool bToOwnDict); | 76 CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument, bool bToOwnDict); |
77 ~CPDF_Annot(); | 77 ~CPDF_Annot(); |
78 | 78 |
79 CPDF_Annot::Subtype GetSubtype() const; | 79 CPDF_Annot::Subtype GetSubtype() const; |
80 uint32_t GetFlags() const; | 80 uint32_t GetFlags() const; |
81 CFX_FloatRect GetRect() const; | 81 CFX_FloatRect GetRect() const; |
82 const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; } | 82 const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; } |
83 CPDF_Dictionary* GetAnnotDict() { return m_pAnnotDict; } | 83 CPDF_Dictionary* GetAnnotDict() { return m_pAnnotDict; } |
| 84 CPDF_Document* GetDocument() const { return m_pDocument; } |
| 85 |
84 FX_BOOL DrawAppearance(CPDF_Page* pPage, | 86 FX_BOOL DrawAppearance(CPDF_Page* pPage, |
85 CFX_RenderDevice* pDevice, | 87 CFX_RenderDevice* pDevice, |
86 const CFX_Matrix* pUser2Device, | 88 const CFX_Matrix* pUser2Device, |
87 AppearanceMode mode, | 89 AppearanceMode mode, |
88 const CPDF_RenderOptions* pOptions); | 90 const CPDF_RenderOptions* pOptions); |
89 FX_BOOL DrawInContext(const CPDF_Page* pPage, | 91 FX_BOOL DrawInContext(const CPDF_Page* pPage, |
90 CPDF_RenderContext* pContext, | 92 CPDF_RenderContext* pContext, |
91 const CFX_Matrix* pUser2Device, | 93 const CFX_Matrix* pUser2Device, |
92 AppearanceMode mode); | 94 AppearanceMode mode); |
| 95 |
93 void ClearCachedAP(); | 96 void ClearCachedAP(); |
94 void DrawBorder(CFX_RenderDevice* pDevice, | 97 void DrawBorder(CFX_RenderDevice* pDevice, |
95 const CFX_Matrix* pUser2Device, | 98 const CFX_Matrix* pUser2Device, |
96 const CPDF_RenderOptions* pOptions); | 99 const CPDF_RenderOptions* pOptions); |
97 CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode); | 100 CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode); |
98 void SetOpenState(bool bOpenState) { m_bOpenState = bOpenState; } | 101 void SetOpenState(bool bOpenState) { m_bOpenState = bOpenState; } |
99 CPDF_Annot* GetPopupAnnot() const { return m_pPopupAnnot; } | 102 CPDF_Annot* GetPopupAnnot() const { return m_pPopupAnnot; } |
100 void SetPopupAnnot(CPDF_Annot* pAnnot) { m_pPopupAnnot = pAnnot; } | 103 void SetPopupAnnot(CPDF_Annot* pAnnot) { m_pPopupAnnot = pAnnot; } |
101 | 104 |
102 private: | 105 private: |
(...skipping 16 matching lines...) Expand all Loading... |
119 bool m_bIsTextMarkupAnnotation; | 122 bool m_bIsTextMarkupAnnotation; |
120 // Not owned. If there is a valid pointer in |m_pPopupAnnot|, | 123 // Not owned. If there is a valid pointer in |m_pPopupAnnot|, |
121 // then this annot is never a popup. | 124 // then this annot is never a popup. |
122 CPDF_Annot* m_pPopupAnnot; | 125 CPDF_Annot* m_pPopupAnnot; |
123 }; | 126 }; |
124 | 127 |
125 CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, | 128 CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, |
126 CPDF_Annot::AppearanceMode mode); | 129 CPDF_Annot::AppearanceMode mode); |
127 | 130 |
128 #endif // CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_ | 131 #endif // CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_ |
OLD | NEW |