| 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_formfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_formfiller.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 "fpdfsdk/formfiller/cba_fontmap.h" | 10 #include "fpdfsdk/formfiller/cba_fontmap.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 CFX_FloatRect rcWin = rcAnnot; | 66 CFX_FloatRect rcWin = rcAnnot; |
| 67 | 67 |
| 68 CFX_FloatRect rcFocus = GetFocusBox(pPageView); | 68 CFX_FloatRect rcFocus = GetFocusBox(pPageView); |
| 69 if (!rcFocus.IsEmpty()) | 69 if (!rcFocus.IsEmpty()) |
| 70 rcWin.Union(rcFocus); | 70 rcWin.Union(rcFocus); |
| 71 | 71 |
| 72 CFX_FloatRect rect = CPWL_Utils::InflateRect(rcWin, 1); | 72 CFX_FloatRect rect = CPWL_Utils::InflateRect(rcWin, 1); |
| 73 | 73 |
| 74 return rect.GetOutterRect(); | 74 return rect.GetOuterRect(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, | 77 void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, |
| 78 CPDFSDK_Annot* pAnnot, | 78 CPDFSDK_Annot* pAnnot, |
| 79 CFX_RenderDevice* pDevice, | 79 CFX_RenderDevice* pDevice, |
| 80 CFX_Matrix* pUser2Device, | 80 CFX_Matrix* pUser2Device, |
| 81 uint32_t dwFlags) { | 81 uint32_t dwFlags) { |
| 82 ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); | 82 ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); |
| 83 | 83 |
| 84 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { | 84 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 } | 713 } |
| 714 } | 714 } |
| 715 | 715 |
| 716 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, | 716 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, |
| 717 CPDFSDK_Annot* pAnnot, | 717 CPDFSDK_Annot* pAnnot, |
| 718 CFX_RenderDevice* pDevice, | 718 CFX_RenderDevice* pDevice, |
| 719 CFX_Matrix* pUser2Device, | 719 CFX_Matrix* pUser2Device, |
| 720 uint32_t dwFlags) { | 720 uint32_t dwFlags) { |
| 721 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); | 721 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); |
| 722 } | 722 } |
| OLD | NEW |