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

Side by Side Diff: ui/gfx/interpolated_transform.h

Issue 642323002: Extending support for 3d in gfx::InterpolatedScale and gfx::InterpolatedTranslation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding unit_tests Created 6 years, 2 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 | « no previous file | ui/gfx/interpolated_transform.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 #ifndef UI_GFX_INTERPOLATED_TRANSFORM_H_ 5 #ifndef UI_GFX_INTERPOLATED_TRANSFORM_H_
6 #define UI_GFX_INTERPOLATED_TRANSFORM_H_ 6 #define UI_GFX_INTERPOLATED_TRANSFORM_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 }; 162 };
163 163
164 class GFX_EXPORT InterpolatedTranslation : public InterpolatedTransform { 164 class GFX_EXPORT InterpolatedTranslation : public InterpolatedTransform {
165 public: 165 public:
166 InterpolatedTranslation(const gfx::Point& start_pos, 166 InterpolatedTranslation(const gfx::Point& start_pos,
167 const gfx::Point& end_pos); 167 const gfx::Point& end_pos);
168 InterpolatedTranslation(const gfx::Point& start_pos, 168 InterpolatedTranslation(const gfx::Point& start_pos,
169 const gfx::Point& end_pos, 169 const gfx::Point& end_pos,
170 float start_time, 170 float start_time,
171 float end_time); 171 float end_time);
172 InterpolatedTranslation(const gfx::Point3F& start_pos,
173 const gfx::Point3F& end_pos);
174 InterpolatedTranslation(const gfx::Point3F& start_pos,
175 const gfx::Point3F& end_pos,
176 float start_time,
177 float end_time);
172 virtual ~InterpolatedTranslation(); 178 virtual ~InterpolatedTranslation();
173 179
174 protected: 180 protected:
175 virtual gfx::Transform InterpolateButDoNotCompose(float t) const override; 181 virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
176 182
177 private: 183 private:
178 const gfx::Point start_pos_; 184 const gfx::Point3F start_pos_;
179 const gfx::Point end_pos_; 185 const gfx::Point3F end_pos_;
180 186
181 DISALLOW_COPY_AND_ASSIGN(InterpolatedTranslation); 187 DISALLOW_COPY_AND_ASSIGN(InterpolatedTranslation);
182 }; 188 };
183 189
184 /////////////////////////////////////////////////////////////////////////////// 190 ///////////////////////////////////////////////////////////////////////////////
185 // class InterpolatedConstantTransform 191 // class InterpolatedConstantTransform
186 // 192 //
187 // Represents a transform that is constant over time. This is only useful when 193 // Represents a transform that is constant over time. This is only useful when
188 // composed with other interpolated transforms. 194 // composed with other interpolated transforms.
189 // 195 //
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void Init(const gfx::Transform& start_transform, 262 void Init(const gfx::Transform& start_transform,
257 const gfx::Transform& end_transform); 263 const gfx::Transform& end_transform);
258 264
259 gfx::DecomposedTransform start_decomp_; 265 gfx::DecomposedTransform start_decomp_;
260 gfx::DecomposedTransform end_decomp_; 266 gfx::DecomposedTransform end_decomp_;
261 }; 267 };
262 268
263 } // namespace ui 269 } // namespace ui
264 270
265 #endif // UI_GFX_INTERPOLATED_TRANSFORM_H_ 271 #endif // UI_GFX_INTERPOLATED_TRANSFORM_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/interpolated_transform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698