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

Side by Side Diff: core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp

Issue 2223213002: Refactor fx_ge part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase Created 4 years, 4 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
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 "core/fpdfapi/fpdf_render/render_int.h" 7 #include "core/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" 11 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h"
12 #include "core/fpdfapi/fpdf_page/cpdf_meshstream.h" 12 #include "core/fpdfapi/fpdf_page/cpdf_meshstream.h"
13 #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h" 13 #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h"
14 #include "core/fpdfapi/fpdf_page/cpdf_tilingpattern.h" 14 #include "core/fpdfapi/fpdf_page/cpdf_tilingpattern.h"
15 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" 15 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h"
16 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" 16 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h"
17 #include "core/fpdfapi/fpdf_page/include/cpdf_pathobject.h" 17 #include "core/fpdfapi/fpdf_page/include/cpdf_pathobject.h"
18 #include "core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h" 18 #include "core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h"
19 #include "core/fpdfapi/fpdf_page/pageint.h" 19 #include "core/fpdfapi/fpdf_page/pageint.h"
20 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 20 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
21 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" 21 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
22 #include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h" 22 #include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h"
23 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" 23 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h"
24 #include "core/fxge/include/cfx_fxgedevice.h"
24 #include "core/fxge/include/cfx_pathdata.h" 25 #include "core/fxge/include/cfx_pathdata.h"
26 #include "core/fxge/include/cfx_renderdevice.h"
25 #include "core/fxge/include/ifx_renderdevicedriver.h" 27 #include "core/fxge/include/ifx_renderdevicedriver.h"
26 28
27 namespace { 29 namespace {
28 30
29 uint32_t CountOutputs( 31 uint32_t CountOutputs(
30 const std::vector<std::unique_ptr<CPDF_Function>>& funcs) { 32 const std::vector<std::unique_ptr<CPDF_Function>>& funcs) {
31 uint32_t total = 0; 33 uint32_t total = 0;
32 for (const auto& func : funcs) { 34 for (const auto& func : funcs) {
33 if (func) 35 if (func)
34 total += func->CountOutputs(); 36 total += func->CountOutputs();
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 } 1193 }
1192 } 1194 }
1193 if (bStroke) { 1195 if (bStroke) {
1194 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); 1196 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor();
1195 if (StrokeColor.IsPattern()) { 1197 if (StrokeColor.IsPattern()) {
1196 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); 1198 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE);
1197 bStroke = FALSE; 1199 bStroke = FALSE;
1198 } 1200 }
1199 } 1201 }
1200 } 1202 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698