| 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 #ifndef UI_BASE_ANIMATION_TWEEN_H_ | 5 #ifndef UI_BASE_ANIMATION_TWEEN_H_ |
| 6 #define UI_BASE_ANIMATION_TWEEN_H_ | 6 #define UI_BASE_ANIMATION_TWEEN_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ui/base/ui_export.h" | 9 #include "ui/base/ui_export.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Returns the value based on the tween type. |state| is from 0-1. | 31 // Returns the value based on the tween type. |state| is from 0-1. |
| 32 static double CalculateValue(Type type, double state); | 32 static double CalculateValue(Type type, double state); |
| 33 | 33 |
| 34 // Conveniences for getting a value between a start and end point. | 34 // Conveniences for getting a value between a start and end point. |
| 35 static double ValueBetween(double value, double start, double target); | 35 static double ValueBetween(double value, double start, double target); |
| 36 static int ValueBetween(double value, int start, int target); | 36 static int ValueBetween(double value, int start, int target); |
| 37 static gfx::Rect ValueBetween(double value, | 37 static gfx::Rect ValueBetween(double value, |
| 38 const gfx::Rect& start_bounds, | 38 const gfx::Rect& start_bounds, |
| 39 const gfx::Rect& target_bounds); | 39 const gfx::Rect& target_bounds); |
| 40 static Transform ValueBetween(double value, | 40 static gfx::Transform ValueBetween(double value, |
| 41 const Transform& start_transform, | 41 const gfx::Transform& start_transform, |
| 42 const Transform& target_transform); | 42 const gfx::Transform& target_transform); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 Tween(); | 45 Tween(); |
| 46 ~Tween(); | 46 ~Tween(); |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(Tween); | 48 DISALLOW_COPY_AND_ASSIGN(Tween); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace ui | 51 } // namespace ui |
| 52 | 52 |
| 53 #endif // UI_BASE_ANIMATION_TWEEN_H_ | 53 #endif // UI_BASE_ANIMATION_TWEEN_H_ |
| OLD | NEW |