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

Unified Diff: ui/gfx/rect.h

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vector length and conversion to size Created 8 years, 2 months 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 2eab239d4bc76d948c93b86606622841fe778b39..f43016f3e53bde49dbd21909c2dd5bf9e0714d95 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -18,6 +18,7 @@
#include "ui/gfx/rect_base.h"
#include "ui/gfx/rect_f.h"
#include "ui/gfx/size.h"
+#include "ui/gfx/vector2d.h"
#if defined(OS_WIN)
typedef struct tagRECT RECT;
@@ -33,7 +34,8 @@ namespace gfx {
class Insets;
-class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> {
+class UI_EXPORT Rect
+ : public RectBase<Rect, Point, Size, Insets, Vector2d, int> {
public:
Rect();
Rect(int width, int height);
@@ -76,7 +78,7 @@ inline bool operator!=(const Rect& lhs, const Rect& rhs) {
}
#if !defined(COMPILER_MSVC)
-extern template class RectBase<Rect, Point, Size, Insets, int>;
+extern template class RectBase<Rect, Point, Size, Insets, Vector2d, int>;
#endif
} // namespace gfx
« ui/gfx/point_f.h ('K') | « ui/gfx/point_unittest.cc ('k') | ui/gfx/rect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698