Lines Matching refs:fraction

29 inline constexpr float lerp(float fromValue, float toValue, float fraction) {  in lerp()  argument
30 return float(fromValue * (1 - fraction) + toValue * fraction); in lerp()
39 float fraction) const { in evaluate()
40 float a = lerp(SkColorGetA(fromColor) / 255.0f, SkColorGetA(toColor) / 255.0f, fraction); in evaluate()
41 float r = lerp(linearize(SkColorGetR(fromColor)), linearize(SkColorGetR(toColor)), fraction); in evaluate()
42 float g = lerp(linearize(SkColorGetG(fromColor)), linearize(SkColorGetG(toColor)), fraction); in evaluate()
43 float b = lerp(linearize(SkColorGetB(fromColor)), linearize(SkColorGetB(toColor)), fraction); in evaluate()
50 float fraction) const { in evaluate()
51 VectorDrawableUtils::interpolatePaths(out, from, to, fraction); in evaluate()
55 const T PropertyValuesHolderImpl<T>::getValueFromData(float fraction) const { in getValueFromData()
60 if (fraction <= 0.0f) { in getValueFromData()
63 if (fraction >= 1.0f) { in getValueFromData()
67 fraction *= mDataSource.size() - 1; in getValueFromData()
68 int lowIndex = floor(fraction); in getValueFromData()
69 fraction -= lowIndex; in getValueFromData()
72 mEvaluator->evaluate(&value, mDataSource[lowIndex], mDataSource[lowIndex + 1], fraction); in getValueFromData()
77 const T PropertyValuesHolderImpl<T>::calculateAnimatedValue(float fraction) const { in calculateAnimatedValue()
79 return getValueFromData(fraction); in calculateAnimatedValue()
82 mEvaluator->evaluate(&value, mStartValue, mEndValue, fraction); in calculateAnimatedValue()
87 void GroupPropertyValuesHolder::setFraction(float fraction) { in setFraction() argument
88 float animatedValue = calculateAnimatedValue(fraction); in setFraction()
92 void FullPathColorPropertyValuesHolder::setFraction(float fraction) { in setFraction() argument
93 SkColor animatedValue = calculateAnimatedValue(fraction); in setFraction()
97 void FullPathPropertyValuesHolder::setFraction(float fraction) { in setFraction() argument
98 float animatedValue = calculateAnimatedValue(fraction); in setFraction()
102 void PathDataPropertyValuesHolder::setFraction(float fraction) { in setFraction() argument
103 mEvaluator->evaluate(&mPathData, mStartValue, mEndValue, fraction); in setFraction()
107 void RootAlphaPropertyValuesHolder::setFraction(float fraction) { in setFraction() argument
108 float animatedValue = calculateAnimatedValue(fraction); in setFraction()