Update expectations according to build bot status.
[chromium-blink-merge.git] / gfx / point.cc
blob16a821687757d7fe6a7373415be1b4969bba8f08
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gfx/point.h"
7 #if defined(OS_WIN)
8 #include <windows.h>
9 #endif
11 #include <iostream>
13 namespace gfx {
15 Point::Point() : x_(0), y_(0) {
18 Point::Point(int x, int y) : x_(x), y_(y) {
21 #if defined(OS_WIN)
22 Point::Point(DWORD point) {
23 POINTS points = MAKEPOINTS(point);
24 x_ = points.x;
25 y_ = points.y;
28 Point::Point(const POINT& point) : x_(point.x), y_(point.y) {
31 Point& Point::operator=(const POINT& point) {
32 x_ = point.x;
33 y_ = point.y;
34 return *this;
37 POINT Point::ToPOINT() const {
38 POINT p;
39 p.x = x_;
40 p.y = y_;
41 return p;
43 #elif defined(OS_MACOSX)
44 Point::Point(const CGPoint& point) : x_(point.x), y_(point.y) {
47 CGPoint Point::ToCGPoint() const {
48 return CGPointMake(x_, y_);
50 #endif
52 } // namespace gfx
54 std::ostream& operator<<(std::ostream& out, const gfx::Point& p) {
55 return out << p.x() << "," << p.y();