summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_imageobject.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-06 00:32:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-06 00:32:16 +0000
commitd9826495fe0e279c6e2d587a656c7452cc2dc71f (patch)
tree0256f8903da70445c5f8e21b62c01d2d70385201 /core/fpdfapi/page/cpdf_imageobject.cpp
parenta0032a2a2c53794bbf0ccb412a5c70ce66f052fb (diff)
downloadpdfium-d9826495fe0e279c6e2d587a656c7452cc2dc71f.tar.xz
Encapsulate CPDF_PageObject's rect member.
At the same time, change it from 4 floats to a CFX_FloatRect. Change-Id: I00ded941723d6a264b7a17c73fd337e66b449308 Reviewed-on: https://pdfium-review.googlesource.com/c/43570 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_imageobject.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_imageobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_imageobject.cpp b/core/fpdfapi/page/cpdf_imageobject.cpp
index 516a6e8cad..2b3d7b0de3 100644
--- a/core/fpdfapi/page/cpdf_imageobject.cpp
+++ b/core/fpdfapi/page/cpdf_imageobject.cpp
@@ -44,8 +44,8 @@ const CPDF_ImageObject* CPDF_ImageObject::AsImage() const {
}
void CPDF_ImageObject::CalcBoundingBox() {
- std::tie(m_Left, m_Right, m_Top, m_Bottom) =
- m_Matrix.TransformRect(0.f, 1.f, 1.f, 0.f);
+ static constexpr CFX_FloatRect kRect(0.0f, 0.0f, 1.0f, 1.0f);
+ SetRect(m_Matrix.TransformRect(kRect));
}
void CPDF_ImageObject::SetImage(const RetainPtr<CPDF_Image>& pImage) {