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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 else | 107 else |
108 options.m_Flags &= ~RENDER_CLEARTYPE; | 108 options.m_Flags &= ~RENDER_CLEARTYPE; |
109 | 109 |
110 // Grayscale output | 110 // Grayscale output |
111 if (flags & FPDF_GRAYSCALE) { | 111 if (flags & FPDF_GRAYSCALE) { |
112 options.m_ColorMode = RENDER_COLOR_GRAY; | 112 options.m_ColorMode = RENDER_COLOR_GRAY; |
113 options.m_ForeColor = 0; | 113 options.m_ForeColor = 0; |
114 options.m_BackColor = 0xffffff; | 114 options.m_BackColor = 0xffffff; |
115 } | 115 } |
116 options.m_AddFlags = flags >> 8; | 116 options.m_AddFlags = flags >> 8; |
| 117 options.m_bDrawAnnots = flags & FPDF_ANNOT; |
117 | 118 |
118 #ifdef PDF_ENABLE_XFA | 119 #ifdef PDF_ENABLE_XFA |
119 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); | 120 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); |
120 if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView(pPage, true)) | 121 if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView(pPage, true)) |
121 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); | 122 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); |
122 #else // PDF_ENABLE_XFA | 123 #else // PDF_ENABLE_XFA |
123 options.m_pOCContext = | 124 options.m_pOCContext = |
124 new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View); | 125 new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View); |
125 if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) | 126 if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) |
126 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options); | 127 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 CPDF_Action action = aa.GetAction(CPDF_AAction::OpenPage); | 713 CPDF_Action action = aa.GetAction(CPDF_AAction::OpenPage); |
713 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); | 714 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); |
714 } | 715 } |
715 } else { | 716 } else { |
716 if (aa.ActionExist(CPDF_AAction::ClosePage)) { | 717 if (aa.ActionExist(CPDF_AAction::ClosePage)) { |
717 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); | 718 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); |
718 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); | 719 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); |
719 } | 720 } |
720 } | 721 } |
721 } | 722 } |
OLD | NEW |