| OLD | NEW |
| 1 // Copyright (c) 2010 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 #include "ppapi/cpp/rect.h" | 5 #include "ppapi/cpp/rect.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 void AdjustAlongAxis(int32_t dst_origin, int32_t dst_size, | 11 void AdjustAlongAxis(int32_t dst_origin, int32_t dst_size, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return Point(x() + (width() + 1) / 2, y() + (height() + 1) / 2); | 120 return Point(x() + (width() + 1) / 2, y() + (height() + 1) / 2); |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool Rect::SharesEdgeWith(const Rect& rect) const { | 123 bool Rect::SharesEdgeWith(const Rect& rect) const { |
| 124 return (y() == rect.y() && height() == rect.height() && | 124 return (y() == rect.y() && height() == rect.height() && |
| 125 (x() == rect.right() || right() == rect.x())) || | 125 (x() == rect.right() || right() == rect.x())) || |
| 126 (x() == rect.x() && width() == rect.width() && | 126 (x() == rect.x() && width() == rect.width() && |
| 127 (y() == rect.bottom() || bottom() == rect.y())); | 127 (y() == rect.bottom() || bottom() == rect.y())); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace gfx | 130 } // namespace pp |
| OLD | NEW |