summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_basic_coords.cpp10
-rw-r--r--core/fxcrt/fx_coordinates.h9
2 files changed, 1 insertions, 18 deletions
diff --git a/core/fxcrt/fx_basic_coords.cpp b/core/fxcrt/fx_basic_coords.cpp
index 0567fa76c5..0785c7821b 100644
--- a/core/fxcrt/fx_basic_coords.cpp
+++ b/core/fxcrt/fx_basic_coords.cpp
@@ -50,15 +50,7 @@ void FX_RECT::Intersect(const FX_RECT& src) {
left = top = right = bottom = 0;
}
}
-void FX_RECT::Union(const FX_RECT& other_rect) {
- Normalize();
- FX_RECT other = other_rect;
- other.Normalize();
- left = left < other.left ? left : other.left;
- right = right > other.right ? right : other.right;
- bottom = bottom > other.bottom ? bottom : other.bottom;
- top = top < other.top ? top : other.top;
-}
+
bool GetIntersection(FX_FLOAT low1,
FX_FLOAT high1,
FX_FLOAT low2,
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index 12640216ee..ae09cf341e 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -195,7 +195,6 @@ using CFX_VectorF = CFX_VTemplate<FX_FLOAT>;
// LTRB rectangles (y-axis runs downwards).
struct FX_RECT {
FX_RECT() : left(0), top(0), right(0), bottom(0) {}
-
FX_RECT(int l, int t, int r, int b) : left(l), top(t), right(r), bottom(b) {}
int Width() const { return right - left; }
@@ -215,9 +214,6 @@ struct FX_RECT {
void Intersect(const FX_RECT& src);
void Intersect(int l, int t, int r, int b) { Intersect(FX_RECT(l, t, r, b)); }
- void Union(const FX_RECT& other_rect);
- void Union(int l, int t, int r, int b) { Union(FX_RECT(l, t, r, b)); }
-
void Offset(int dx, int dy) {
left += dx;
right += dx;
@@ -230,11 +226,6 @@ struct FX_RECT {
bottom == src.bottom;
}
- bool Contains(const FX_RECT& other_rect) const {
- return other_rect.left >= left && other_rect.right <= right &&
- other_rect.top >= top && other_rect.bottom <= bottom;
- }
-
bool Contains(int x, int y) const {
return x >= left && x < right && y >= top && y < bottom;
}