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/formfiller/cffl_iformfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_iformfiller.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, | 40 FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, |
41 CPDFSDK_Annot* pAnnot) { | 41 CPDFSDK_Annot* pAnnot) { |
42 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) | 42 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) |
43 return pFormFiller->GetViewBBox(pPageView, pAnnot); | 43 return pFormFiller->GetViewBBox(pPageView, pAnnot); |
44 | 44 |
45 ASSERT(pPageView); | 45 ASSERT(pPageView); |
46 | 46 |
47 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 47 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
48 CFX_FloatRect rcAnnot; | 48 CFX_FloatRect rcWin = CPWL_Utils::InflateRect(pPDFAnnot->GetRect(), 1); |
49 pPDFAnnot->GetRect(rcAnnot); | |
50 | |
51 CFX_FloatRect rcWin = CPWL_Utils::InflateRect(rcAnnot, 1); | |
52 return rcWin.GetOuterRect(); | 49 return rcWin.GetOuterRect(); |
53 } | 50 } |
54 | 51 |
55 void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, | 52 void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, |
56 CPDFSDK_Annot* pAnnot, | 53 CPDFSDK_Annot* pAnnot, |
57 CFX_RenderDevice* pDevice, | 54 CFX_RenderDevice* pDevice, |
58 CFX_Matrix* pUser2Device, | 55 CFX_Matrix* pUser2Device, |
59 uint32_t dwFlags) { | 56 uint32_t dwFlags) { |
60 ASSERT(pPageView); | 57 ASSERT(pPageView); |
61 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 58 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 bExit = TRUE; | 999 bExit = TRUE; |
1003 m_bNotifying = FALSE; | 1000 m_bNotifying = FALSE; |
1004 return; | 1001 return; |
1005 } | 1002 } |
1006 } | 1003 } |
1007 | 1004 |
1008 m_bNotifying = FALSE; | 1005 m_bNotifying = FALSE; |
1009 } | 1006 } |
1010 } | 1007 } |
1011 } | 1008 } |
OLD | NEW |