Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace util::geometry::rect_contains_point in favor of Rect::contains #8791

Closed
frewsxcv opened this issue Dec 3, 2015 · 0 comments
Closed

Replace util::geometry::rect_contains_point in favor of Rect::contains #8791

frewsxcv opened this issue Dec 3, 2015 · 0 comments

Comments

@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Dec 3, 2015

Remove

/// Returns true if the rect contains the given point. Points on the top or left sides of the rect
/// are considered inside the rectangle, while points on the right or bottom sides of the rect are
/// not considered inside the rectangle.
pub fn rect_contains_point<T>(rect: Rect<T>, point: Point2D<T>) -> bool
where T: PartialOrd + Add<T, Output=T>
{
point.x >= rect.origin.x && point.x < rect.origin.x + rect.size.width &&
point.y >= rect.origin.y && point.y < rect.origin.y + rect.size.height
}

Replace usages with http://doc.servo.org/euclid/rect/struct.Rect.html#method.contains

@frewsxcv frewsxcv added the C-assigned label Dec 3, 2015
bors-servo added a commit that referenced this issue Dec 3, 2015
Replaced rect_contains_point with Rect.contains()

This is a proposed in #8791 clean up.

Fixes #8791.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8797)
<!-- Reviewable:end -->
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…) (from pointlessone:rect-contains); r=Manishearth

This is a proposed in servo/servo#8791 clean up.

Fixes #8791.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68922e0ac2e36d10dd5f079ecae5de7c07cd1253
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…) (from pointlessone:rect-contains); r=Manishearth

This is a proposed in servo/servo#8791 clean up.

Fixes #8791.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68922e0ac2e36d10dd5f079ecae5de7c07cd1253

UltraBlame original commit: 4da2d30e3debd6543e8831943f5f2a0a1d471db3
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…) (from pointlessone:rect-contains); r=Manishearth

This is a proposed in servo/servo#8791 clean up.

Fixes #8791.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68922e0ac2e36d10dd5f079ecae5de7c07cd1253

UltraBlame original commit: 4da2d30e3debd6543e8831943f5f2a0a1d471db3
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…) (from pointlessone:rect-contains); r=Manishearth

This is a proposed in servo/servo#8791 clean up.

Fixes #8791.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68922e0ac2e36d10dd5f079ecae5de7c07cd1253

UltraBlame original commit: 4da2d30e3debd6543e8831943f5f2a0a1d471db3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.