Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: ui/gfx/animation/tween.cc

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/animation/tween.h ('k') | ui/gfx/animation/tween_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/gfx/animation/tween.h ('k') | ui/gfx/animation/tween_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698