summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_shadingobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_shadingobject.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_shadingobject.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingobject.cpp b/core/fpdfapi/page/cpdf_shadingobject.cpp
index 725e2e4591..bdaceaa7e8 100644
--- a/core/fpdfapi/page/cpdf_shadingobject.cpp
+++ b/core/fpdfapi/page/cpdf_shadingobject.cpp
@@ -27,10 +27,10 @@ void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) {
m_Matrix.Concat(matrix);
if (m_ClipPath.HasRef()) {
CalcBoundingBox();
- } else {
- std::tie(m_Left, m_Right, m_Top, m_Bottom) =
- matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom);
+ return;
}
+
+ SetRect(matrix.TransformRect(GetRect()));
}
bool CPDF_ShadingObject::IsShading() const {
@@ -48,9 +48,5 @@ const CPDF_ShadingObject* CPDF_ShadingObject::AsShading() const {
void CPDF_ShadingObject::CalcBoundingBox() {
if (!m_ClipPath.HasRef())
return;
- CFX_FloatRect rect = m_ClipPath.GetClipBox();
- m_Left = rect.left;
- m_Bottom = rect.bottom;
- m_Right = rect.right;
- m_Top = rect.top;
+ SetRect(m_ClipPath.GetClipBox());
}