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 "fpdfsdk/include/fsdk_mgr.h" | 7 #include "fpdfsdk/include/fsdk_mgr.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 docView->GetWidgetHandler()->RenderWidget(annot->GetXFAWidget(), &gs, | 562 docView->GetWidgetHandler()->RenderWidget(annot->GetXFAWidget(), &gs, |
563 pUser2Device, FALSE); | 563 pUser2Device, FALSE); |
564 return; | 564 return; |
565 } | 565 } |
566 #endif // PDF_ENABLE_XFA | 566 #endif // PDF_ENABLE_XFA |
567 | 567 |
568 // for pdf/static xfa. | 568 // for pdf/static xfa. |
569 CPDFSDK_AnnotIterator annotIterator(this, true); | 569 CPDFSDK_AnnotIterator annotIterator(this, true); |
570 while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) { | 570 while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) { |
571 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); | 571 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); |
572 pAnnotHandlerMgr->Annot_OnDraw(this, pSDKAnnot, pDevice, pUser2Device, 0); | 572 pAnnotHandlerMgr->Annot_OnDraw(this, pSDKAnnot, pDevice, pUser2Device); |
573 } | 573 } |
574 } | 574 } |
575 | 575 |
576 const CPDF_Annot* CPDFSDK_PageView::GetPDFAnnotAtPoint(FX_FLOAT pageX, | 576 const CPDF_Annot* CPDFSDK_PageView::GetPDFAnnotAtPoint(FX_FLOAT pageX, |
577 FX_FLOAT pageY) { | 577 FX_FLOAT pageY) { |
578 for (const auto& pAnnot : m_pAnnotList->All()) { | 578 for (const auto& pAnnot : m_pAnnotList->All()) { |
579 CFX_FloatRect annotRect = pAnnot->GetRect(); | 579 CFX_FloatRect annotRect = pAnnot->GetRect(); |
580 if (annotRect.Contains(pageX, pageY)) | 580 if (annotRect.Contains(pageX, pageY)) |
581 return pAnnot.get(); | 581 return pAnnot.get(); |
582 } | 582 } |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 return pAnnot; | 1022 return pAnnot; |
1023 } | 1023 } |
1024 return nullptr; | 1024 return nullptr; |
1025 } | 1025 } |
1026 | 1026 |
1027 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { | 1027 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { |
1028 CPDF_Dictionary* pDict = GetPDFPage()->m_pFormDict; | 1028 CPDF_Dictionary* pDict = GetPDFPage()->m_pFormDict; |
1029 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); | 1029 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); |
1030 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; | 1030 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; |
1031 } | 1031 } |
OLD | NEW |