| Index: core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
|
| index 4ed6c0767581d0824ce0a1352c2d6e4c14246018..964b98bb791bc5e8230f0c7db6a9710879644e7f 100644
|
| --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
|
| +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
|
| @@ -868,33 +868,34 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern,
|
| pBitmap->Clear(background);
|
| int fill_mode = m_Options.m_Flags;
|
| switch (pPattern->m_ShadingType) {
|
| - case 1:
|
| + case kFunctionBasedShading:
|
| DrawFuncShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs, pColorSpace,
|
| alpha);
|
| break;
|
| - case 2:
|
| + case kAxialShading:
|
| DrawAxialShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs,
|
| pColorSpace, alpha);
|
| break;
|
| - case 3:
|
| + case kRadialShading:
|
| DrawRadialShading(pBitmap, &FinalMatrix, pDict, pFuncs, nFuncs,
|
| pColorSpace, alpha);
|
| break;
|
| - case 4: {
|
| + case kFreeFormGouraudTriangleMeshShading: {
|
| DrawFreeGouraudShading(pBitmap, &FinalMatrix,
|
| ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs,
|
| pColorSpace, alpha);
|
| } break;
|
| - case 5: {
|
| + case kLatticeFormGouraudTriangleMeshShading: {
|
| DrawLatticeGouraudShading(pBitmap, &FinalMatrix,
|
| ToStream(pPattern->m_pShadingObj), pFuncs,
|
| nFuncs, pColorSpace, alpha);
|
| } break;
|
| - case 6:
|
| - case 7: {
|
| - DrawCoonPatchMeshes(pPattern->m_ShadingType - 6, pBitmap, &FinalMatrix,
|
| - ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs,
|
| - pColorSpace, fill_mode, alpha);
|
| + case kCoonsPatchMeshShading:
|
| + case kTensorProductPatchMeshShading: {
|
| + DrawCoonPatchMeshes(
|
| + pPattern->m_ShadingType == kTensorProductPatchMeshShading, pBitmap,
|
| + &FinalMatrix, ToStream(pPattern->m_pShadingObj), pFuncs, nFuncs,
|
| + pColorSpace, fill_mode, alpha);
|
| } break;
|
| }
|
| if (bAlphaMode) {
|
|
|