summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 3bd40d5b7c..4e3857bf85 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1113,15 +1113,14 @@ void CPDF_StreamContentParser::Handle_ShadeFill() {
if (!pShading->IsShadingObject() || !pShading->Load())
return;
- auto pObj = pdfium::MakeUnique<CPDF_ShadingObject>();
- pObj->m_pShading = pShading;
+ CFX_Matrix matrix = m_pCurStates->m_CTM;
+ matrix.Concat(m_mtContentToUser);
+ auto pObj = pdfium::MakeUnique<CPDF_ShadingObject>(pShading, matrix);
SetGraphicStates(pObj.get(), false, false, false);
- pObj->m_Matrix = m_pCurStates->m_CTM;
- pObj->m_Matrix.Concat(m_mtContentToUser);
CFX_FloatRect bbox =
pObj->m_ClipPath.HasRef() ? pObj->m_ClipPath.GetClipBox() : m_BBox;
if (pShading->IsMeshShading())
- bbox.Intersect(GetShadingBBox(pShading, pObj->m_Matrix));
+ bbox.Intersect(GetShadingBBox(pShading, pObj->matrix()));
pObj->m_Left = bbox.left;
pObj->m_Right = bbox.right;
pObj->m_Top = bbox.top;