| 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 "core/fxge/include/cfx_renderdevice.h" | 10 #include "core/fxge/include/cfx_renderdevice.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 CFX_FloatRect rect = CPWL_Utils::InflateRect(rcWin, 1); | 78 CFX_FloatRect rect = CPWL_Utils::InflateRect(rcWin, 1); |
| 79 | 79 |
| 80 return rect.GetOuterRect(); | 80 return rect.GetOuterRect(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, | 83 void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, |
| 84 CPDFSDK_Annot* pAnnot, | 84 CPDFSDK_Annot* pAnnot, |
| 85 CFX_RenderDevice* pDevice, | 85 CFX_RenderDevice* pDevice, |
| 86 CFX_Matrix* pUser2Device, | 86 CFX_Matrix* pUser2Device, |
| 87 uint32_t dwFlags) { | 87 uint32_t dwFlags) { |
| 88 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == "Widget"); | 88 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
| 89 | 89 |
| 90 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { | 90 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { |
| 91 CFX_Matrix mt = GetCurMatrix(); | 91 CFX_Matrix mt = GetCurMatrix(); |
| 92 mt.Concat(*pUser2Device); | 92 mt.Concat(*pUser2Device); |
| 93 pWnd->DrawAppearance(pDevice, &mt); | 93 pWnd->DrawAppearance(pDevice, &mt); |
| 94 } else { | 94 } else { |
| 95 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 95 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
| 96 if (CFFL_IFormFiller::IsVisible(pWidget)) | 96 if (CFFL_IFormFiller::IsVisible(pWidget)) |
| 97 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, | 97 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, |
| 98 nullptr); | 98 nullptr); |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 } | 717 } |
| 718 } | 718 } |
| 719 | 719 |
| 720 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, | 720 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, |
| 721 CPDFSDK_Annot* pAnnot, | 721 CPDFSDK_Annot* pAnnot, |
| 722 CFX_RenderDevice* pDevice, | 722 CFX_RenderDevice* pDevice, |
| 723 CFX_Matrix* pUser2Device, | 723 CFX_Matrix* pUser2Device, |
| 724 uint32_t dwFlags) { | 724 uint32_t dwFlags) { |
| 725 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); | 725 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); |
| 726 } | 726 } |
| OLD | NEW |