OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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. | |
4 | |
5 #include "mojo/services/geometry/cpp/logging.h" | |
6 | |
7 namespace mojo { | |
8 | |
9 std::ostream& operator<<(std::ostream& os, const mojo::Point& value) { | |
10 return os << "{x=" << value.x << ", y=" << value.y << "}"; | |
11 } | |
12 | |
13 std::ostream& operator<<(std::ostream& os, const mojo::Size& value) { | |
14 return os << "{width=" << value.width << ", height=" << value.height << "}"; | |
15 } | |
16 | |
17 std::ostream& operator<<(std::ostream& os, const mojo::Rect& value) { | |
18 return os << "{x=" << value.x << ", y=" << value.y | |
19 << ", width=" << value.width << ", height=" << value.height << "}"; | |
20 } | |
21 | |
22 std::ostream& operator<<(std::ostream& os, const mojo::RRect& value) { | |
23 return os << "{x=" << value.x << ", y=" << value.y | |
24 << ", width=" << value.width << ", height=" << value.height | |
25 << ", top_left_radius_x=" << value.top_left_radius_x | |
26 << ", top_left_radius_y=" << value.top_left_radius_y | |
27 << ", top_right_radius_x=" << value.top_right_radius_x | |
28 << ", top_right_radius_y=" << value.top_right_radius_y | |
29 << ", bottom_left_radius_x=" << value.bottom_left_radius_x | |
30 << ", bottom_left_radius_y=" << value.bottom_left_radius_y | |
31 << ", bottom_right_radius_x=" << value.bottom_right_radius_x | |
32 << ", bottom_right_radius_y=" << value.bottom_right_radius_y << "}"; | |
33 } | |
34 | |
35 std::ostream& operator<<(std::ostream& os, const mojo::Transform& value) { | |
36 if (value.matrix) { | |
37 os << "["; | |
38 for (size_t i = 0; i < 4; i++) { | |
39 if (i != 0) | |
40 os << ", "; | |
41 os << "["; | |
42 for (size_t j = 0; j < 4; j++) { | |
43 if (j != 0) | |
44 os << ", "; | |
45 os << value.matrix[i * 4 + j]; | |
46 } | |
47 os << "]"; | |
48 } | |
49 os << "]"; | |
50 } else { | |
51 os << "null"; | |
52 } | |
53 return os; | |
54 | |
55 return os << value.matrix; | |
viettrungluu
2015/12/11 00:15:13
Delete.
jeffbrown
2015/12/11 19:40:55
Gahh... thanks.
| |
56 } | |
57 | |
58 } // namespace mojo | |
OLD | NEW |