diff options
author | 2013-10-30 17:39:43 +0000 | |
---|---|---|
committer | 2013-10-30 17:39:43 +0000 | |
commit | 4db592c4085afed2be27a208d778f9ee13e671ab (patch) | |
tree | 552cc422fc26f9e5db0386410ecf2fded67c0227 /src/core/SkPath.cpp | |
parent | 4e5559af8947ae7dc3df531b6d7a73323db20c3f (diff) |
remove contains(x,y) for rects and rrects ... not well defined, and unused
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/51953003
git-svn-id: http://skia.googlecode.com/svn/trunk@12022 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPath.cpp')
-rw-r--r-- | src/core/SkPath.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 9df62850fd..8f79fbe370 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -2961,14 +2961,17 @@ static int winding_line(const SkPoint pts[], SkScalar x, SkScalar y) { return dir; } +static bool contains_inclusive(const SkRect& r, SkScalar x, SkScalar y) { + return r.fLeft <= x && x <= r.fRight && r.fTop <= y && y <= r.fBottom; +} + bool SkPath::contains(SkScalar x, SkScalar y) const { bool isInverse = this->isInverseFillType(); if (this->isEmpty()) { return isInverse; } - const SkRect& bounds = this->getBounds(); - if (!bounds.contains(x, y)) { + if (!contains_inclusive(this->getBounds(), x, y)) { return isInverse; } |