diff options
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp index b2eb5e642c..968c53bc07 100644 --- a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp @@ -35,12 +35,12 @@ CPDF_PageObject::Type CPDF_ShadingObject::GetType() const { } void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) { - if (!m_ClipPath.IsNull()) { + if (m_ClipPath) { m_ClipPath.GetModify(); m_ClipPath.Transform(matrix); } m_Matrix.Concat(matrix); - if (!m_ClipPath.IsNull()) { + if (m_ClipPath) { CalcBoundingBox(); } else { matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom); @@ -60,9 +60,8 @@ const CPDF_ShadingObject* CPDF_ShadingObject::AsShading() const { } void CPDF_ShadingObject::CalcBoundingBox() { - if (m_ClipPath.IsNull()) { + if (!m_ClipPath) return; - } CFX_FloatRect rect = m_ClipPath.GetClipBox(); m_Left = rect.left; m_Bottom = rect.bottom; |