| 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 "public/fpdf_formfill.h" | 7 #include "public/fpdf_formfill.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); | 130 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); |
| 131 if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true)) | 131 if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true)) |
| 132 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); | 132 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); |
| 133 #else // PDF_ENABLE_XFA | 133 #else // PDF_ENABLE_XFA |
| 134 options.m_pOCContext = | 134 options.m_pOCContext = |
| 135 new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View); | 135 new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View); |
| 136 if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) | 136 if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) |
| 137 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options); | 137 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options); |
| 138 #endif // PDF_ENABLE_XFA | 138 #endif // PDF_ENABLE_XFA |
| 139 | 139 |
| 140 #ifdef _SKIA_SUPPORT_PATHS |
| 141 CFXBitmapFromFPDFBitmap(bitmap)->UnPreMultiply(); |
| 142 #endif |
| 140 pDevice->RestoreState(false); | 143 pDevice->RestoreState(false); |
| 141 delete options.m_pOCContext; | 144 delete options.m_pOCContext; |
| 142 options.m_pOCContext = nullptr; | 145 options.m_pOCContext = nullptr; |
| 143 } | 146 } |
| 144 | 147 |
| 145 } // namespace | 148 } // namespace |
| 146 | 149 |
| 147 DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, | 150 DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, |
| 148 FPDF_PAGE page, | 151 FPDF_PAGE page, |
| 149 double page_x, | 152 double page_x, |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 pFormFillEnv); | 745 pFormFillEnv); |
| 743 } | 746 } |
| 744 } else { | 747 } else { |
| 745 if (aa.ActionExist(CPDF_AAction::ClosePage)) { | 748 if (aa.ActionExist(CPDF_AAction::ClosePage)) { |
| 746 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); | 749 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); |
| 747 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, | 750 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, |
| 748 pFormFillEnv); | 751 pFormFillEnv); |
| 749 } | 752 } |
| 750 } | 753 } |
| 751 } | 754 } |
| OLD | NEW |