summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.cpp
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-18 14:42:58 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-21 15:05:56 +0000
commit69ad278881f83a1f8cf45d5a42a88752c0871c7e (patch)
tree0118fe1b71175b3c5b2da9c49b33ef9a349f8444 /core/fxcrt/fx_coordinates.cpp
parent8c6dc95678810e3a054744a6a229606ac0d75134 (diff)
downloadpdfium-69ad278881f83a1f8cf45d5a42a88752c0871c7e.tar.xz
Converted CFX_FloatRect::{Init|Update}Rect() to take point objects
Converted CFX_FloatRect::Init() and CFX_FloatRect::UpdateRect() to take in a CFX_PointF object instead of two coordinates. Bug=pdfium:770 Change-Id: Ibcb620f192d6c086158c39f23c411777286005d0 Reviewed-on: https://pdfium-review.googlesource.com/11450 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_coordinates.cpp')
-rw-r--r--core/fxcrt/fx_coordinates.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index 752591d3ed..26c9169fd9 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -184,11 +184,11 @@ bool CFX_FloatRect::Contains(const CFX_FloatRect& other_rect) const {
n2.top <= n1.top;
}
-void CFX_FloatRect::UpdateRect(float x, float y) {
- left = std::min(left, x);
- bottom = std::min(bottom, y);
- right = std::max(right, x);
- top = std::max(top, y);
+void CFX_FloatRect::UpdateRect(const CFX_PointF& point) {
+ left = std::min(left, point.x);
+ bottom = std::min(bottom, point.y);
+ right = std::max(right, point.x);
+ top = std::max(top, point.y);
}
CFX_FloatRect CFX_FloatRect::GetBBox(const CFX_PointF* pPoints, int nPoints) {