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

Unified Diff: ui/gfx/rect.h

Issue 11293194: ui: Prefer +/- operators to apply offsets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gfx:: 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
Index: ui/gfx/rect.h
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index 5479d2e2b0319de060fd0d0d73067c9e01bf225e..d555996a8316a74dae33b4fcde80d72e2a2fbdde 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -77,6 +77,9 @@ inline bool operator!=(const Rect& lhs, const Rect& rhs) {
return !(lhs == rhs);
}
+UI_EXPORT Rect operator+(const Rect& lhs, const Vector2d& rhs);
+UI_EXPORT Rect operator-(const Rect& lhs, const Vector2d& rhs);
Peter Kasting 2012/11/09 22:02:36 Nit: Probably want to define operators for the opp
danakj 2012/11/09 22:10:10 I was wondering about that as well. Is it as easy
+
UI_EXPORT Rect IntersectRects(const Rect& a, const Rect& b);
UI_EXPORT Rect UnionRects(const Rect& a, const Rect& b);
UI_EXPORT Rect SubtractRects(const Rect& a, const Rect& b);

Powered by Google App Engine
This is Rietveld 408576698