OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/box_f.h" | 5 #include "ui/gfx/box_f.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
8 | 10 |
9 namespace gfx { | 11 namespace gfx { |
10 | 12 |
11 std::string BoxF::ToString() const { | 13 std::string BoxF::ToString() const { |
12 return base::StringPrintf("%s %fx%fx%f", | 14 return base::StringPrintf("%s %fx%fx%f", |
13 origin().ToString().c_str(), | 15 origin().ToString().c_str(), |
14 width_, | 16 width_, |
15 height_, | 17 height_, |
16 depth_); | 18 depth_); |
(...skipping 26 matching lines...) Expand all Loading... |
43 depth_ = max_z - min_z; | 45 depth_ = max_z - min_z; |
44 } | 46 } |
45 | 47 |
46 BoxF UnionBoxes(const BoxF& a, const BoxF& b) { | 48 BoxF UnionBoxes(const BoxF& a, const BoxF& b) { |
47 BoxF result = a; | 49 BoxF result = a; |
48 result.Union(b); | 50 result.Union(b); |
49 return result; | 51 return result; |
50 } | 52 } |
51 | 53 |
52 } // namespace gfx | 54 } // namespace gfx |
OLD | NEW |