diff options
author | Lei Zhang <thestig@chromium.org> | 2017-12-19 16:35:26 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-08 23:17:06 +0000 |
commit | 88469f5fa0fe43b74063ffaec97617ef0abbb8ca (patch) | |
tree | 6f38498021fe68baccd427dc99620a326a074f60 /core/fpdfapi/page/cpdf_streamcontentparser.cpp | |
parent | 1f2211e9c3d0c2c3a448280b58c85d021cb3ee4b (diff) | |
download | pdfium-88469f5fa0fe43b74063ffaec97617ef0abbb8ca.tar.xz |
Encapsulate CPDF_ShadingObject members.
Change-Id: I9b878c8df4a6208fb1908bad09eb1c699970163f
Reviewed-on: https://pdfium-review.googlesource.com/21690
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.cpp | 9 |
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; |