Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: ui/gfx/rect_f.h

Issue 11293194: ui: Prefer +/- operators to apply offsets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: floats Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« .gitmodules ('K') | « ui/gfx/rect_base_impl.h ('k') | ui/gfx/rect_f.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/rect_f.h
diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h
index a86ac9e4c669aa4a0eafca5a2dda36eb538b5032..c9310194c34ffe23bd6f5c14a8a45cd2ed55e617 100644
--- a/ui/gfx/rect_f.h
+++ b/ui/gfx/rect_f.h
@@ -58,6 +58,13 @@ inline bool operator!=(const RectF& lhs, const RectF& rhs) {
return !(lhs == rhs);
}
+UI_EXPORT RectF operator+(const RectF& lhs, const Vector2dF& rhs);
+UI_EXPORT RectF operator-(const RectF& lhs, const Vector2dF& rhs);
+
+inline RectF operator+(const Vector2dF& lhs, const RectF& rhs) {
+ return rhs + lhs;
+}
+
UI_EXPORT RectF IntersectRects(const RectF& a, const RectF& b);
UI_EXPORT RectF UnionRects(const RectF& a, const RectF& b);
UI_EXPORT RectF SubtractRects(const RectF& a, const RectF& b);
« .gitmodules ('K') | « ui/gfx/rect_base_impl.h ('k') | ui/gfx/rect_f.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698