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

Unified Diff: ui/gfx/point.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup 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/point.cc
diff --git a/ui/gfx/point.cc b/ui/gfx/point.cc
index 322413e9da1d874e42452d4ac3c24a46c7695ed1..e0b55953238ea6528f5149f1cf701eeaf0f760d7 100644
--- a/ui/gfx/point.cc
+++ b/ui/gfx/point.cc
@@ -12,22 +12,23 @@
namespace gfx {
-template class PointBase<Point, int>;
+template class PointBase<Point, int, Vector2d>;
-Point::Point() : PointBase<Point, int>(0, 0) {
+Point::Point() : PointBase<Point, int, Vector2d>(0, 0) {
}
-Point::Point(int x, int y) : PointBase<Point, int>(x, y) {
+Point::Point(int x, int y) : PointBase<Point, int, Vector2d>(x, y) {
}
#if defined(OS_WIN)
-Point::Point(DWORD point) : PointBase<Point, int>(0, 0){
+Point::Point(DWORD point) : PointBase<Point, int, Vector2d>(0, 0){
POINTS points = MAKEPOINTS(point);
set_x(points.x);
set_y(points.y);
}
-Point::Point(const POINT& point) : PointBase<Point, int>(point.x, point.y) {
+Point::Point(const POINT& point)
+ : PointBase<Point, int, Vector2d>(point.x, point.y) {
}
Point& Point::operator=(const POINT& point) {
@@ -43,7 +44,8 @@ POINT Point::ToPOINT() const {
return p;
}
#elif defined(OS_MACOSX)
-Point::Point(const CGPoint& point) : PointBase<Point, int>(point.x, point.y) {
+Point::Point(const CGPoint& point)
+ : PointBase<Point, int, Vector2d>(point.x, point.y) {
}
CGPoint Point::ToCGPoint() const {

Powered by Google App Engine
This is Rietveld 408576698