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/render | |
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/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 3f61358d7f..8899867354 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -2065,7 +2065,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj, } } -void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern, +void CPDF_RenderStatus::DrawShading(const CPDF_ShadingPattern* pPattern, CFX_Matrix* pMatrix, FX_RECT& clip_rect, int alpha, @@ -2197,9 +2197,9 @@ void CPDF_RenderStatus::ProcessShading(const CPDF_ShadingObject* pShadingObj, if (rect.IsEmpty()) return; - CFX_Matrix matrix = pShadingObj->m_Matrix; + CFX_Matrix matrix = pShadingObj->matrix(); matrix.Concat(*pObj2Device); - DrawShading(pShadingObj->m_pShading.Get(), &matrix, rect, + DrawShading(pShadingObj->pattern(), &matrix, rect, FXSYS_round(255 * pShadingObj->m_GeneralState.GetFillAlpha()), m_Options.ColorModeIs(CPDF_RenderOptions::kAlpha)); } diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h index 1dbdf5bbd3..c8b7b09017 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.h +++ b/core/fpdfapi/render/cpdf_renderstatus.h @@ -121,7 +121,7 @@ class CPDF_RenderStatus { bool ProcessImage(CPDF_ImageObject* pImageObj, const CFX_Matrix* pObj2Device); void ProcessShading(const CPDF_ShadingObject* pShadingObj, const CFX_Matrix* pObj2Device); - void DrawShading(CPDF_ShadingPattern* pPattern, + void DrawShading(const CPDF_ShadingPattern* pPattern, CFX_Matrix* pMatrix, FX_RECT& clip_rect, int alpha, |