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/shadow_value.h" | 5 #include "ui/gfx/shadow_value.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "ui/gfx/insets.h" | 10 #include "ui/gfx/geometry/insets.h" |
11 #include "ui/gfx/point_conversions.h" | 11 #include "ui/gfx/point_conversions.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 | 14 |
15 ShadowValue::ShadowValue() | 15 ShadowValue::ShadowValue() |
16 : blur_(0), | 16 : blur_(0), |
17 color_(0) { | 17 color_(0) { |
18 } | 18 } |
19 | 19 |
20 ShadowValue::ShadowValue(const gfx::Point& offset, | 20 ShadowValue::ShadowValue(const gfx::Point& offset, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 left = std::max(left, blur - shadow.x()); | 61 left = std::max(left, blur - shadow.x()); |
62 top = std::max(top, blur - shadow.y()); | 62 top = std::max(top, blur - shadow.y()); |
63 right = std::max(right, blur + shadow.x()); | 63 right = std::max(right, blur + shadow.x()); |
64 bottom = std::max(bottom, blur + shadow.y()); | 64 bottom = std::max(bottom, blur + shadow.y()); |
65 } | 65 } |
66 | 66 |
67 return Insets(-top, -left, -bottom, -right); | 67 return Insets(-top, -left, -bottom, -right); |
68 } | 68 } |
69 | 69 |
70 } // namespace gfx | 70 } // namespace gfx |
OLD | NEW |