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

Side by Side Diff: ui/gfx/geometry/cubic_bezier.h

Issue 1871743003: ui: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/events/ozone/evdev/touch_evdev_types.cc ('k') | ui/gfx/geometry/cubic_bezier.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_GEOMETRY_CUBIC_BEZIER_H_ 5 #ifndef UI_GFX_GEOMETRY_CUBIC_BEZIER_H_
6 #define UI_GFX_GEOMETRY_CUBIC_BEZIER_H_ 6 #define UI_GFX_GEOMETRY_CUBIC_BEZIER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/gfx_export.h" 9 #include "ui/gfx/gfx_export.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 12
13 class GFX_EXPORT CubicBezier { 13 class GFX_EXPORT CubicBezier {
14 public: 14 public:
15 CubicBezier(double p1x, double p1y, double p2x, double p2y); 15 CubicBezier(double p1x, double p1y, double p2x, double p2y);
16 CubicBezier(const CubicBezier& other);
16 17
17 double SampleCurveX(double t) const { 18 double SampleCurveX(double t) const {
18 // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule. 19 // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.
19 return ((ax_ * t + bx_) * t + cx_) * t; 20 return ((ax_ * t + bx_) * t + cx_) * t;
20 } 21 }
21 22
22 double SampleCurveY(double t) const { 23 double SampleCurveY(double t) const {
23 return ((ay_ * t + by_) * t + cy_) * t; 24 return ((ay_ * t + by_) * t + cy_) * t;
24 } 25 }
25 26
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 double range_min_; 82 double range_min_;
82 double range_max_; 83 double range_max_;
83 84
84 DISALLOW_ASSIGN(CubicBezier); 85 DISALLOW_ASSIGN(CubicBezier);
85 }; 86 };
86 87
87 } // namespace gfx 88 } // namespace gfx
88 89
89 #endif // UI_GFX_GEOMETRY_CUBIC_BEZIER_H_ 90 #endif // UI_GFX_GEOMETRY_CUBIC_BEZIER_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/touch_evdev_types.cc ('k') | ui/gfx/geometry/cubic_bezier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698