summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-01 19:38:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-01 19:38:51 +0000
commit789a42bf019b80f7490b785dbed548b578414afe (patch)
treec7eaed24ab05c2bd244c00f918a0587673027de8 /core/fxcrt
parenta07159bb2eff04b300406b072eec4f3182cf7269 (diff)
downloadpdfium-789a42bf019b80f7490b785dbed548b578414afe.tar.xz
Remove unused CFX_FloatRect::Substract4().
Change-Id: I08706f53bf3960cbea60b09a1702bf0ba371f1ce Reviewed-on: https://pdfium-review.googlesource.com/20211 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt')
-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;