| 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/animation/tween.h" | 5 #include "ui/gfx/animation/tween.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return end_transform; | 196 return end_transform; |
| 197 if (value <= 0.0) | 197 if (value <= 0.0) |
| 198 return start_transform; | 198 return start_transform; |
| 199 | 199 |
| 200 gfx::Transform to_return = end_transform; | 200 gfx::Transform to_return = end_transform; |
| 201 to_return.Blend(start_transform, value); | 201 to_return.Blend(start_transform, value); |
| 202 | 202 |
| 203 return to_return; | 203 return to_return; |
| 204 } | 204 } |
| 205 | 205 |
| 206 gfx::SizeF Tween::SizeValueBetween(double value, |
| 207 const gfx::SizeF& start_size, |
| 208 const gfx::SizeF& target_size) { |
| 209 return gfx::SizeF( |
| 210 Tween::FloatValueBetween(value, start_size.width(), target_size.width()), |
| 211 Tween::FloatValueBetween(value, start_size.height(), |
| 212 target_size.height())); |
| 213 } |
| 214 |
| 206 } // namespace gfx | 215 } // namespace gfx |
| OLD | NEW |