diff options
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp | 12 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp index 640adb14da..3f7347b8f1 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -522,12 +522,14 @@ FX_BOOL CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) { m_pRenderStatus->m_bDropObjects, NULL, TRUE); CFX_Matrix patternDevice = *pObj2Device; patternDevice.Translate((FX_FLOAT)-rect.left, (FX_FLOAT)-rect.top); - if (m_pPattern->m_PatternType == PATTERN_TILING) { - bitmap_render.DrawTilingPattern((CPDF_TilingPattern*)m_pPattern, - m_pImageObject, &patternDevice, FALSE); + if (m_pPattern->m_PatternType == CPDF_Pattern::TILING) { + bitmap_render.DrawTilingPattern( + static_cast<CPDF_TilingPattern*>(m_pPattern), m_pImageObject, + &patternDevice, FALSE); } else { - bitmap_render.DrawShadingPattern((CPDF_ShadingPattern*)m_pPattern, - m_pImageObject, &patternDevice, FALSE); + bitmap_render.DrawShadingPattern( + static_cast<CPDF_ShadingPattern*>(m_pPattern), m_pImageObject, + &patternDevice, FALSE); } } { diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp index 718fa73009..8cee178369 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp @@ -1187,12 +1187,12 @@ void CPDF_RenderStatus::DrawPathWithPattern(CPDF_PathObject* pPathObj, if (!pattern) { return; } - if (pattern->m_PatternType == PATTERN_TILING) { - DrawTilingPattern((CPDF_TilingPattern*)pattern, pPathObj, pObj2Device, - bStroke); + if (pattern->m_PatternType == CPDF_Pattern::TILING) { + DrawTilingPattern(static_cast<CPDF_TilingPattern*>(pattern), pPathObj, + pObj2Device, bStroke); } else { - DrawShadingPattern((CPDF_ShadingPattern*)pattern, pPathObj, pObj2Device, - bStroke); + DrawShadingPattern(static_cast<CPDF_ShadingPattern*>(pattern), pPathObj, + pObj2Device, bStroke); } } void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj, |