summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_coordinates.cpp10
-rw-r--r--core/fxcrt/fx_coordinates.h12
2 files changed, 11 insertions, 11 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) {
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index 86b921d85c..cc14508d70 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -274,13 +274,13 @@ class CFX_FloatRect {
int Substract4(CFX_FloatRect& substract_rect, CFX_FloatRect* pRects);
- void InitRect(float x, float y) {
- left = x;
- right = x;
- bottom = y;
- top = y;
+ void InitRect(const CFX_PointF& point) {
+ left = point.x;
+ right = point.x;
+ bottom = point.y;
+ top = point.y;
}
- void UpdateRect(float x, float y);
+ void UpdateRect(const CFX_PointF& point);
float Width() const { return right - left; }
float Height() const { return top - bottom; }