summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.h
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-22 10:50:06 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-22 16:42:55 +0000
commit878b27de2fa8e5bdc3b910c98846f4b43185d4aa (patch)
treef21a9528354ebf533a637f5ea0e8edaa44be7427 /core/fxcrt/fx_coordinates.h
parentaac59a0e59052366e260396165a759b5b0e80188 (diff)
downloadpdfium-878b27de2fa8e5bdc3b910c98846f4b43185d4aa.tar.xz
Converted CFX_Matrix::TransformRect() to take in consts
Currently, all three of CFX_Matrix::TransformRect() take in rect values and modify them in place. This CL converts them to take in constant values and return the transformed values instead, and fixes all the call sites. Bug=pdfium:874 Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b Reviewed-on: https://pdfium-review.googlesource.com/11550 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
Diffstat (limited to 'core/fxcrt/fx_coordinates.h')
-rw-r--r--core/fxcrt/fx_coordinates.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index cc14508d70..a4074a4afa 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -8,6 +8,7 @@
#define CORE_FXCRT_FX_COORDINATES_H_
#include <algorithm>
+#include <tuple>
#include "core/fxcrt/fx_basic.h"
@@ -672,14 +673,13 @@ class CFX_Matrix {
CFX_PointF Transform(const CFX_PointF& point) const;
- void TransformRect(CFX_RectF& rect) const;
- void TransformRect(float& left,
- float& right,
- float& top,
- float& bottom) const;
- void TransformRect(CFX_FloatRect& rect) const {
- TransformRect(rect.left, rect.right, rect.top, rect.bottom);
- }
+ std::tuple<float, float, float, float> TransformRect(
+ const float& left,
+ const float& right,
+ const float& top,
+ const float& bottom) const;
+ CFX_RectF TransformRect(const CFX_RectF& rect) const;
+ CFX_FloatRect TransformRect(const CFX_FloatRect& rect) const;
float a;
float b;