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

Unified Diff: include/utils/SkInterpolator.h

Issue 1562333002: test & doc for SkUnitCubicInterp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/InterpolatorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkInterpolator.h
diff --git a/include/utils/SkInterpolator.h b/include/utils/SkInterpolator.h
index 9547cec8b23641fdb0e01af6961531dcb33aa3fd..e062b38f65d11283b4d193b3db52065f0b26e930 100644
--- a/include/utils/SkInterpolator.h
+++ b/include/utils/SkInterpolator.h
@@ -121,8 +121,15 @@ private:
typedef SkInterpolatorBase INHERITED;
};
-/** Given all the parameters are [0...1], apply the cubic specified by (0,0)
- (bx,by) (cx,cy) (1,1) to value, returning the answer, also [0...1].
+/** Interpolate a cubic curve, typically to provide an ease-in ease-out transition.
+ All the parameters are in the range of [0...1].
+ The input value is treated as the x-coordinate of the cubic.
+ The output value is the y-coordinate on the cubic at the x-coordinate.
+
+ @param value The x-coordinate pinned between [0..1].
+ @param bx,by,cx,cy The cubic control points where the cubic is specified
+ as (0,0) (bx,by) (cx,cy) (1,1)
+ @return the corresponding y-coordinate value, from [0..1].
*/
SkScalar SkUnitCubicInterp(SkScalar value, SkScalar bx, SkScalar by,
SkScalar cx, SkScalar cy);
« no previous file with comments | « no previous file | tests/InterpolatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698