Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: fpdfsdk/fpdfformfill.cpp

Issue 2323203002: Define behaviors of FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw. (Closed)
Patch Set: roll DEPS Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidgethandler.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidgethandler.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698