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 | 140 pDevice->RestoreState(false); |
| 141 #ifdef _SKIA_SUPPORT_PATHS_ |
| 142 pDevice->Flush(); |
141 CFXBitmapFromFPDFBitmap(bitmap)->UnPreMultiply(); | 143 CFXBitmapFromFPDFBitmap(bitmap)->UnPreMultiply(); |
142 #endif | 144 #endif |
143 pDevice->RestoreState(false); | |
144 delete options.m_pOCContext; | 145 delete options.m_pOCContext; |
145 options.m_pOCContext = nullptr; | 146 options.m_pOCContext = nullptr; |
146 } | 147 } |
147 | 148 |
148 } // namespace | 149 } // namespace |
149 | 150 |
150 DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, | 151 DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, |
151 FPDF_PAGE page, | 152 FPDF_PAGE page, |
152 double page_x, | 153 double page_x, |
153 double page_y) { | 154 double page_y) { |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 pFormFillEnv); | 746 pFormFillEnv); |
746 } | 747 } |
747 } else { | 748 } else { |
748 if (aa.ActionExist(CPDF_AAction::ClosePage)) { | 749 if (aa.ActionExist(CPDF_AAction::ClosePage)) { |
749 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); | 750 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); |
750 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, | 751 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, |
751 pFormFillEnv); | 752 pFormFillEnv); |
752 } | 753 } |
753 } | 754 } |
754 } | 755 } |
OLD | NEW |