OLD | NEW |
1 // Copyright (c) 2012 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 "ui/gfx/insets_f.h" | |
6 | |
7 #include "base/stringprintf.h" | 5 #include "base/stringprintf.h" |
| 6 #include "ui/gfx/vector2d.h" |
8 | 7 |
9 namespace gfx { | 8 namespace gfx { |
10 | 9 |
11 std::string InsetsF::ToString() const { | 10 Vector2d::Vector2d() |
12 // Print members in the same order of the constructor parameters. | 11 : m_x(0), |
13 return StringPrintf("%f,%f,%f,%f", top_, left_, bottom_, right_); | 12 m_y(0) { |
| 13 } |
| 14 |
| 15 Vector2d::Vector2d(int x, int y) |
| 16 : m_x(x), |
| 17 m_y(y) { |
| 18 } |
| 19 |
| 20 std::string Vector2d::ToString() const { |
| 21 return base::StringPrintf("[%d %d]", m_x, m_y); |
14 } | 22 } |
15 | 23 |
16 } // namespace gfx | 24 } // namespace gfx |
OLD | NEW |