Index: ui/gfx/geometry/steps.h |
diff --git a/ui/gfx/geometry/steps.h b/ui/gfx/geometry/steps.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f831b3f9a3171426a5b6047ee8fd8b330dd46d9e |
--- /dev/null |
+++ b/ui/gfx/geometry/steps.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2014 Samsung. All rights reserved. |
ajuma
2014/02/24 21:11:16
I believe this should be "The Chromium Authors" (s
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_GFX_GEOMETRY_STEPS_H_ |
+#define UI_GFX_GEOMETRY_STEPS_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/gfx/gfx_export.h" |
+ |
+namespace gfx { |
+ |
+class GFX_EXPORT Steps { |
+ public: |
+ Steps(int steps, bool steps_at_start); |
+ ~Steps(); |
+ |
+ // Returns y at the given x. |
+ double Solve(double x) const; |
+ |
+ // Sets |min| and |max| to the bezier's minimum and maximium y values in the |
ajuma
2014/02/24 21:11:16
s/bezier/step function/
|
+ // interval [0, 1]. |
+ void Range(double* min, double* max) const; |
+ |
+ private: |
+ int steps_; |
+ bool steps_at_start_; |
+ |
+ DISALLOW_ASSIGN(Steps); |
+}; |
+ |
+} // namespace gfx |
+ |
+#endif // UI_GFX_GEOMETRY_STEPS_H_ |