diff options
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp | 3 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/render_int.h | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp index acfc083e0e..954d3886b5 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -462,7 +462,7 @@ FX_BOOL CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus, int blendType) { m_pRenderStatus = pStatus; m_bStdCS = bStdCS; - m_pImageObject = (CPDF_ImageObject*)pObj; + m_pImageObject = pObj->AsImage(); m_BlendType = blendType; m_pObj2Device = pObj2Device; CPDF_Dictionary* pOC = m_pImageObject->m_pImage->GetOC(); diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp index 769ee05dc9..136c318339 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -731,8 +731,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj, FX_BOOL bStroke) { if (!bStroke) { CPDF_PathObject path; - CPDF_TextObject* pCopy = new CPDF_TextObject; - pCopy->Copy(textobj); + CPDF_TextObject* pCopy = textobj->Clone(); path.m_bStroke = FALSE; path.m_FillType = FXFILL_WINDING; path.m_ClipPath.AppendTexts(&pCopy, 1); diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index 5af5909d2e..b7f007dd5d 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -340,7 +340,7 @@ class CPDF_ImageRenderer : public IPDF_ObjectRenderer { protected: CPDF_RenderStatus* m_pRenderStatus; - CPDF_ImageObject* m_pImageObject; + const CPDF_ImageObject* m_pImageObject; int m_Status; const CFX_Matrix* m_pObj2Device; CFX_Matrix m_ImageMatrix; |