summaryrefslogtreecommitdiffstats
path: root/base/gfx/point.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/gfx/point.cc')
-rw-r--r--base/gfx/point.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/base/gfx/point.cc b/base/gfx/point.cc
index 7c435a0..106810a 100644
--- a/base/gfx/point.cc
+++ b/base/gfx/point.cc
@@ -29,7 +29,9 @@
#include "base/gfx/point.h"
+#if defined(OS_WIN)
#include <windows.h>
+#endif
namespace gfx {
@@ -39,6 +41,7 @@ Point::Point() : x_(0), y_(0) {
Point::Point(int x, int y) : x_(x), y_(y) {
}
+#if defined(OS_WIN)
Point::Point(const POINT& point) : x_(point.x), y_(point.y) {
}
@@ -48,5 +51,13 @@ POINT Point::ToPOINT() const {
p.y = y_;
return p;
}
+#elif defined(OS_MACOSX)
+Point::Point(const CGPoint& point) : x_(point.x), y_(point.y) {
+}
+
+CGPoint Point::ToCGPoint() const {
+ return CGPointMake(x_, y_);
+}
+#endif
} // namespace gfx