summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxcrt/fx_coordinates.cpp43
-rw-r--r--core/fxcrt/fx_coordinates.h2
2 files changed, 0 insertions, 45 deletions
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index b3d0432e1c..c345a822b9 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -83,49 +83,6 @@ void CFX_FloatRect::Union(const CFX_FloatRect& other_rect) {
top = std::max(top, other.top);
}
-int CFX_FloatRect::Substract4(CFX_FloatRect& s, CFX_FloatRect* pRects) {
- Normalize();
- s.Normalize();
- int nRects = 0;
- CFX_FloatRect rects[4];
- if (left < s.left) {
- rects[nRects].left = left;
- rects[nRects].bottom = bottom;
- rects[nRects].right = s.left;
- rects[nRects].top = top;
- nRects++;
- }
- if (s.left < right && s.top < top) {
- rects[nRects].left = s.left;
- rects[nRects].bottom = s.top;
- rects[nRects].right = right;
- rects[nRects].top = top;
- nRects++;
- }
- if (s.top > bottom && s.right < right) {
- rects[nRects].left = s.right;
- rects[nRects].bottom = bottom;
- rects[nRects].right = right;
- rects[nRects].top = s.top;
- nRects++;
- }
- if (s.bottom > bottom) {
- rects[nRects].left = s.left;
- rects[nRects].bottom = bottom;
- rects[nRects].right = s.right;
- rects[nRects].top = s.bottom;
- nRects++;
- }
- if (nRects == 0)
- return 0;
-
- for (int i = 0; i < nRects; i++) {
- pRects[i] = rects[i];
- pRects[i].Intersect(*this);
- }
- return nRects;
-}
-
FX_RECT CFX_FloatRect::GetOuterRect() const {
CFX_FloatRect rect1 = *this;
FX_RECT rect;
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index 5840a14815..49173a38e8 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -255,8 +255,6 @@ class CFX_FloatRect {
FX_RECT GetClosestRect() const;
CFX_FloatRect GetCenterSquare() const;
- int Substract4(CFX_FloatRect& substract_rect, CFX_FloatRect* pRects);
-
void InitRect(const CFX_PointF& point) {
left = point.x;
right = point.x;