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

Side by Side Diff: ui/gfx/geometry/rect_base.h

Issue 109433013: Move geometric types to a separate, more lightweight target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A template for a simple rectangle class. The containment semantics 5 // A template for a simple rectangle class. The containment semantics
6 // are array-like; that is, the coordinate (x, y) is considered to be 6 // are array-like; that is, the coordinate (x, y) is considered to be
7 // contained by the rectangle, but the coordinate (x + width, y) is not. 7 // contained by the rectangle, but the coordinate (x + width, y) is not.
8 // The class will happily let you create malformed rectangles (that is, 8 // The class will happily let you create malformed rectangles (that is,
9 // rectangles with negative width and/or height), but there will be assertions 9 // rectangles with negative width and/or height), but there will be assertions
10 // in the operations (such as Contains()) to complain in this case. 10 // in the operations (such as Contains()) to complain in this case.
11 11
12 #ifndef UI_GFX_RECT_BASE_H_ 12 #ifndef UI_GFX_GEOMETRY_RECT_BASE_H_
13 #define UI_GFX_RECT_BASE_H_ 13 #define UI_GFX_GEOMETRY_RECT_BASE_H_
14 14
15 #include <string> 15 #include <string>
16 16
17 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
18 18
19 namespace gfx { 19 namespace gfx {
20 20
21 template<typename Class, 21 template<typename Class,
22 typename PointClass, 22 typename PointClass,
23 typename SizeClass, 23 typename SizeClass,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Do not make this public. 164 // Do not make this public.
165 ~RectBase() {} 165 ~RectBase() {}
166 166
167 private: 167 private:
168 PointClass origin_; 168 PointClass origin_;
169 SizeClass size_; 169 SizeClass size_;
170 }; 170 };
171 171
172 } // namespace gfx 172 } // namespace gfx
173 173
174 #endif // UI_GFX_RECT_BASE_H_ 174 #endif // UI_GFX_GEOMETRY_RECT_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698