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_baannothandler.h" | 7 #include "fpdfsdk/include/cpdfsdk_baannothandler.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void CPDFSDK_BAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { | 56 void CPDFSDK_BAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { |
57 delete pAnnot; | 57 delete pAnnot; |
58 } | 58 } |
59 | 59 |
60 void CPDFSDK_BAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} | 60 void CPDFSDK_BAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} |
61 | 61 |
62 void CPDFSDK_BAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, | 62 void CPDFSDK_BAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, |
63 CPDFSDK_Annot* pAnnot, | 63 CPDFSDK_Annot* pAnnot, |
64 CFX_RenderDevice* pDevice, | 64 CFX_RenderDevice* pDevice, |
65 CFX_Matrix* pUser2Device, | 65 CFX_Matrix* pUser2Device) { |
66 uint32_t dwFlags) { | |
67 #ifdef PDF_ENABLE_XFA | 66 #ifdef PDF_ENABLE_XFA |
68 if (pAnnot->IsXFAField()) | 67 if (pAnnot->IsXFAField()) |
69 return; | 68 return; |
70 #endif // PDF_ENABLE_XFA | 69 #endif // PDF_ENABLE_XFA |
71 static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance( | 70 static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance( |
72 pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); | 71 pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); |
73 } | 72 } |
74 | 73 |
75 void CPDFSDK_BAAnnotHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, | 74 void CPDFSDK_BAAnnotHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, |
76 CPDFSDK_Annot* pAnnot, | 75 CPDFSDK_Annot* pAnnot, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 205 |
207 FX_BOOL CPDFSDK_BAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, | 206 FX_BOOL CPDFSDK_BAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, |
208 CPDFSDK_Annot* pAnnot, | 207 CPDFSDK_Annot* pAnnot, |
209 const CFX_FloatPoint& point) { | 208 const CFX_FloatPoint& point) { |
210 ASSERT(pPageView); | 209 ASSERT(pPageView); |
211 ASSERT(pAnnot); | 210 ASSERT(pAnnot); |
212 | 211 |
213 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); | 212 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); |
214 return rect.Contains(point.x, point.y); | 213 return rect.Contains(point.x, point.y); |
215 } | 214 } |
OLD | NEW |