From 789a42bf019b80f7490b785dbed548b578414afe Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 1 Dec 2017 19:38:51 +0000 Subject: Remove unused CFX_FloatRect::Substract4(). Change-Id: I08706f53bf3960cbea60b09a1702bf0ba371f1ce Reviewed-on: https://pdfium-review.googlesource.com/20211 Reviewed-by: Henrique Nakashima Commit-Queue: Lei Zhang --- core/fxcrt/fx_coordinates.cpp | 43 ------------------------------------------- core/fxcrt/fx_coordinates.h | 2 -- 2 files changed, 45 deletions(-) (limited to 'core') 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; -- cgit v1.2.3