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 "../../../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 Loading... |
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, pPattern->m_pShadingObj, | 884 DrawFreeGouraudShading(pBitmap, &FinalMatrix, |
885 pFuncs, nFuncs, pColorSpace, alpha); | 885 ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs, |
| 886 pColorSpace, alpha); |
886 } break; | 887 } break; |
887 case 5: { | 888 case 5: { |
888 DrawLatticeGouraudShading(pBitmap, &FinalMatrix, pPattern->m_pShadingObj, | 889 DrawLatticeGouraudShading(pBitmap, &FinalMatrix, |
889 pFuncs, nFuncs, pColorSpace, alpha); | 890 ToStream(pPattern->m_pShadingObj), pFuncs, |
| 891 nFuncs, pColorSpace, alpha); |
890 } break; | 892 } break; |
891 case 6: | 893 case 6: |
892 case 7: { | 894 case 7: { |
893 DrawCoonPatchMeshes(pPattern->m_ShadingType - 6, pBitmap, &FinalMatrix, | 895 DrawCoonPatchMeshes(pPattern->m_ShadingType - 6, pBitmap, &FinalMatrix, |
894 pPattern->m_pShadingObj, pFuncs, nFuncs, pColorSpace, | 896 ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs, |
895 fill_mode, alpha); | 897 pColorSpace, fill_mode, alpha); |
896 } break; | 898 } break; |
897 } | 899 } |
898 if (bAlphaMode) { | 900 if (bAlphaMode) { |
899 pBitmap->LoadChannel(FXDIB_Red, pBitmap, FXDIB_Alpha); | 901 pBitmap->LoadChannel(FXDIB_Red, pBitmap, FXDIB_Alpha); |
900 } | 902 } |
901 if (m_Options.m_ColorMode == RENDER_COLOR_GRAY) { | 903 if (m_Options.m_ColorMode == RENDER_COLOR_GRAY) { |
902 pBitmap->ConvertColorScale(m_Options.m_ForeColor, m_Options.m_BackColor); | 904 pBitmap->ConvertColorScale(m_Options.m_ForeColor, m_Options.m_BackColor); |
903 } | 905 } |
904 buffer.OutputToDevice(); | 906 buffer.OutputToDevice(); |
905 } | 907 } |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 } | 1203 } |
1202 } | 1204 } |
1203 if (bStroke) { | 1205 if (bStroke) { |
1204 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); | 1206 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); |
1205 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { | 1207 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { |
1206 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); | 1208 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); |
1207 bStroke = FALSE; | 1209 bStroke = FALSE; |
1208 } | 1210 } |
1209 } | 1211 } |
1210 } | 1212 } |
OLD | NEW |