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

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

Issue 1885093002: Re-enable warning 4701 for GN build and some cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/fxcodec/jbig2/JBig2_Context.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 "core/fpdfapi/fpdf_render/render_int.h" 7 #include "core/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" 9 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h"
10 #include "core/fpdfapi/fpdf_page/cpdf_meshstream.h" 10 #include "core/fpdfapi/fpdf_page/cpdf_meshstream.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 int y_scale, 646 int y_scale,
647 int left, 647 int left,
648 int bottom, 648 int bottom,
649 Coon_Bezier C1, 649 Coon_Bezier C1,
650 Coon_Bezier C2, 650 Coon_Bezier C2,
651 Coon_Bezier D1, 651 Coon_Bezier D1,
652 Coon_Bezier D2) { 652 Coon_Bezier D2) {
653 FX_BOOL bSmall = C1.Distance() < 2 && C2.Distance() < 2 && 653 FX_BOOL bSmall = C1.Distance() < 2 && C2.Distance() < 2 &&
654 D1.Distance() < 2 && D2.Distance() < 2; 654 D1.Distance() < 2 && D2.Distance() < 2;
655 Coon_Color div_colors[4]; 655 Coon_Color div_colors[4];
656 int d_bottom, d_left, d_top, d_right; 656 int d_bottom = 0;
657 int d_left = 0;
658 int d_top = 0;
659 int d_right = 0;
657 div_colors[0].BiInterpol(patch_colors, left, bottom, x_scale, y_scale); 660 div_colors[0].BiInterpol(patch_colors, left, bottom, x_scale, y_scale);
658 if (!bSmall) { 661 if (!bSmall) {
659 div_colors[1].BiInterpol(patch_colors, left, bottom + 1, x_scale, 662 div_colors[1].BiInterpol(patch_colors, left, bottom + 1, x_scale,
660 y_scale); 663 y_scale);
661 div_colors[2].BiInterpol(patch_colors, left + 1, bottom + 1, x_scale, 664 div_colors[2].BiInterpol(patch_colors, left + 1, bottom + 1, x_scale,
662 y_scale); 665 y_scale);
663 div_colors[3].BiInterpol(patch_colors, left + 1, bottom, x_scale, 666 div_colors[3].BiInterpol(patch_colors, left + 1, bottom, x_scale,
664 y_scale); 667 y_scale);
665 d_bottom = div_colors[3].Distance(div_colors[0]); 668 d_bottom = div_colors[3].Distance(div_colors[0]);
666 d_left = div_colors[1].Distance(div_colors[0]); 669 d_left = div_colors[1].Distance(div_colors[0]);
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 } 1210 }
1208 } 1211 }
1209 if (bStroke) { 1212 if (bStroke) {
1210 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); 1213 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor();
1211 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { 1214 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) {
1212 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); 1215 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE);
1213 bStroke = FALSE; 1216 bStroke = FALSE;
1214 } 1217 }
1215 } 1218 }
1216 } 1219 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/fxcodec/jbig2/JBig2_Context.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698