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

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

Issue 1426713002: Make m_pShadingObj a CPDF_Stream instead of CPDF_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 "../../../include/fpdfapi/fpdf_render.h" 7 #include "../../../include/fpdfapi/fpdf_render.h"
8 #include "../../../include/fpdfapi/fpdf_pageobj.h" 8 #include "../../../include/fpdfapi/fpdf_pageobj.h"
9 #include "../../../include/fxge/fx_ge.h" 9 #include "../../../include/fxge/fx_ge.h"
10 #include "../fpdf_page/pageint.h" 10 #include "../fpdf_page/pageint.h"
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 break; 874 break;
875 case 2: 875 case 2:
876 DrawAxialShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs, 876 DrawAxialShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs,
877 pColorSpace, alpha); 877 pColorSpace, alpha);
878 break; 878 break;
879 case 3: 879 case 3:
880 DrawRadialShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs, 880 DrawRadialShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs,
881 pColorSpace, alpha); 881 pColorSpace, alpha);
882 break; 882 break;
883 case 4: { 883 case 4: {
884 DrawFreeGouraudShading(pBitmap, &FinalMatrix, 884 DrawFreeGouraudShading(pBitmap, &FinalMatrix, pPattern->m_pShadingObj,
885 ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs, 885 pFuncs, nFuncs, pColorSpace, alpha);
886 pColorSpace, alpha);
887 } break; 886 } break;
888 case 5: { 887 case 5: {
889 DrawLatticeGouraudShading(pBitmap, &FinalMatrix, 888 DrawLatticeGouraudShading(pBitmap, &FinalMatrix, pPattern->m_pShadingObj,
890 ToStream(pPattern->m_pShadingObj), pFuncs, 889 pFuncs, nFuncs, pColorSpace, alpha);
891 nFuncs, pColorSpace, alpha);
892 } break; 890 } break;
893 case 6: 891 case 6:
894 case 7: { 892 case 7: {
895 DrawCoonPatchMeshes(pPattern->m_ShadingType - 6, pBitmap, &FinalMatrix, 893 DrawCoonPatchMeshes(pPattern->m_ShadingType - 6, pBitmap, &FinalMatrix,
896 ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs, 894 pPattern->m_pShadingObj, pFuncs, nFuncs, pColorSpace,
897 pColorSpace, fill_mode, alpha); 895 fill_mode, alpha);
898 } break; 896 } break;
899 } 897 }
900 if (bAlphaMode) { 898 if (bAlphaMode) {
901 pBitmap->LoadChannel(FXDIB_Red, pBitmap, FXDIB_Alpha); 899 pBitmap->LoadChannel(FXDIB_Red, pBitmap, FXDIB_Alpha);
902 } 900 }
903 if (m_Options.m_ColorMode == RENDER_COLOR_GRAY) { 901 if (m_Options.m_ColorMode == RENDER_COLOR_GRAY) {
904 pBitmap->ConvertColorScale(m_Options.m_ForeColor, m_Options.m_BackColor); 902 pBitmap->ConvertColorScale(m_Options.m_ForeColor, m_Options.m_BackColor);
905 } 903 }
906 buffer.OutputToDevice(); 904 buffer.OutputToDevice();
907 } 905 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 } 1201 }
1204 } 1202 }
1205 if (bStroke) { 1203 if (bStroke) {
1206 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); 1204 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor();
1207 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { 1205 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) {
1208 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); 1206 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE);
1209 bStroke = FALSE; 1207 bStroke = FALSE;
1210 } 1208 }
1211 } 1209 }
1212 } 1210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698