Searched refs:fraction (Results 1 - 25 of 143) sorted by relevance

123456

/frameworks/base/libs/hwui/
H A DPropertyValuesHolder.cpp29 inline constexpr float lerp(float fromValue, float toValue, float fraction) { argument
30 return float (fromValue * (1 - fraction) + toValue * fraction);
39 const SkColor& fromColor, const SkColor& toColor, float fraction) const {
40 float a = lerp(SkColorGetA(fromColor) / 255.0f, SkColorGetA(toColor) / 255.0f, fraction);
41 float r = lerp(linearize(SkColorGetR(fromColor)), linearize(SkColorGetR(toColor)), fraction);
42 float g = lerp(linearize(SkColorGetG(fromColor)), linearize(SkColorGetG(toColor)), fraction);
43 float b = lerp(linearize(SkColorGetB(fromColor)), linearize(SkColorGetB(toColor)), fraction);
52 const PathData& from, const PathData& to, float fraction) const {
53 VectorDrawableUtils::interpolatePaths(out, from, to, fraction);
89 setFraction(float fraction) argument
94 setFraction(float fraction) argument
99 setFraction(float fraction) argument
104 setFraction(float fraction) argument
109 setFraction(float fraction) argument
[all...]
H A DPropertyValuesHolder.h28 * When a fraction in [0f, 1f] is provided, the holder will calculate an interpolated value based
33 virtual void setFraction(float fraction) = 0;
40 virtual void evaluate(T* out, const T& from, const T& to, float fraction) const {};
46 virtual void evaluate(float* out, const float& from, const float& to, float fraction)
48 *out = from * (1 - fraction) + to * fraction;
55 float fraction) const override;
59 virtual void evaluate(PathData* out, const PathData& from, const PathData& to, float fraction)
73 const T getValueFromData(float fraction) const;
76 const T calculateAnimatedValue(float fraction) cons
[all...]
/frameworks/av/media/libstagefright/codecs/amrwbenc/inc/
H A Dlog2.h50 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1)*/
57 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
/frameworks/base/core/java/android/animation/
H A DFloatEvaluator.java26 * <code>fraction</code> representing the proportion between the start and end values. The
29 * and <code>t</code> is <code>fraction</code>.
31 * @param fraction The fraction from the starting to the ending values
36 * <code>fraction</code> parameter.
38 public Float evaluate(float fraction, Number startValue, Number endValue) { argument
40 return startFloat + fraction * (endValue.floatValue() - startFloat);
H A DIntEvaluator.java26 * <code>fraction</code> representing the proportion between the start and end values. The
29 * and <code>t</code> is <code>fraction</code>.
31 * @param fraction The fraction from the starting to the ending values
36 * <code>fraction</code> parameter.
38 public Integer evaluate(float fraction, Integer startValue, Integer endValue) { argument
40 return (int)(startInt + fraction * (endValue - startInt));
H A DKeyframes.java43 * Gets the animated value, given the elapsed fraction of the animation (interpolated by the
45 * function maps the input fraction to the appropriate keyframe interval and a fraction
46 * between them and returns the interpolated value. Note that the input fraction may fall
48 * spring interpolation that might send the fraction past 1.0). We handle this situation by
51 * @param fraction The elapsed fraction of the animation
54 Object getValue(float fraction); argument
71 * @param fraction The elapsed fraction o
74 getIntValue(float fraction) argument
87 getFloatValue(float fraction) argument
[all...]
H A DPathKeyframes.java66 public Object getValue(float fraction) { argument
68 if (fraction < 0) {
69 return interpolateInRange(fraction, 0, 1);
70 } else if (fraction > 1) {
71 return interpolateInRange(fraction, numPoints - 2, numPoints - 1);
72 } else if (fraction == 0) {
74 } else if (fraction == 1) {
85 if (fraction < midFraction) {
87 } else if (fraction > midFraction) {
94 // now high is below the fraction an
99 interpolateInRange(float fraction, int startIndex, int endIndex) argument
146 interpolate(float fraction, float startValue, float endValue) argument
234 getValue(float fraction) argument
247 getValue(float fraction) argument
[all...]
H A DKeyframe.java76 * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
82 public static Keyframe ofInt(float fraction, int value) { argument
83 return new IntKeyframe(fraction, value);
95 * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
98 public static Keyframe ofInt(float fraction) { argument
99 return new IntKeyframe(fraction);
108 * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
114 ofFloat(float fraction, float value) argument
130 ofFloat(float fraction) argument
146 ofObject(float fraction, Object value) argument
162 ofObject(float fraction) argument
221 setFraction(float fraction) argument
269 ObjectKeyframe(float fraction, Object value) argument
304 IntKeyframe(float fraction, int value) argument
311 IntKeyframe(float fraction) argument
351 FloatKeyframe(float fraction, float value) argument
358 FloatKeyframe(float fraction) argument
[all...]
H A DTypeEvaluator.java31 * <code>fraction</code> representing the proportion between the start and end values. The
34 * and <code>t</code> is <code>fraction</code>.
36 * @param fraction The fraction from the starting to the ending values
40 * <code>fraction</code> parameter.
42 public T evaluate(float fraction, T startValue, T endValue); argument
H A DRectEvaluator.java56 * end Rect values, with <code>fraction</code> representing the proportion
65 * @param fraction The fraction from the starting to the ending values
69 * <code>fraction</code> parameter.
72 public Rect evaluate(float fraction, Rect startValue, Rect endValue) { argument
73 int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction);
74 int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction);
75 int right = startValue.right + (int) ((endValue.right - startValue.right) * fraction);
76 int bottom = startValue.bottom + (int) ((endValue.bottom - startValue.bottom) * fraction);
H A DPointFEvaluator.java56 * end PointF values, with <code>fraction</code> representing the proportion
65 * @param fraction The fraction from the starting to the ending values
69 * <code>fraction</code> parameter.
72 public PointF evaluate(float fraction, PointF startValue, PointF endValue) { argument
73 float x = startValue.x + (fraction * (endValue.x - startValue.x));
74 float y = startValue.y + (fraction * (endValue.y - startValue.y));
H A DFloatArrayEvaluator.java52 * Interpolates the value at each index by the fraction. If
57 * @param fraction The fraction from the starting to the ending values
64 public float[] evaluate(float fraction, float[] startValue, float[] endValue) { argument
73 array[i] = start + (fraction * (end - start));
H A DIntArrayEvaluator.java52 * Interpolates the value at each index by the fraction. If {@link #IntArrayEvaluator(int[])}
56 * @param fraction The fraction from the starting to the ending values
63 public int[] evaluate(float fraction, int[] startValue, int[] endValue) { argument
71 array[i] = (int) (start + (fraction * (end - start)));
H A DFloatKeyframeSet.java39 public Object getValue(float fraction) { argument
40 return getFloatValue(fraction);
56 public float getFloatValue(float fraction) { argument
57 if (fraction <= 0f) {
66 fraction = interpolator.getInterpolation(fraction);
68 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction);
73 } else if (fraction >= 1f) {
82 fraction = interpolator.getInterpolation(fraction);
[all...]
H A DIntKeyframeSet.java39 public Object getValue(float fraction) { argument
40 return getIntValue(fraction);
56 public int getIntValue(float fraction) { argument
57 if (fraction <= 0f) {
66 fraction = interpolator.getInterpolation(fraction);
68 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction);
73 } else if (fraction >= 1f) {
82 fraction = interpolator.getInterpolation(fraction);
[all...]
/frameworks/av/media/libstagefright/codecs/amrnb/common/include/
H A Dpow2.h104 Word16 fraction, /* (i) : Fractional part. (range: 0.0<=val<1.0) */
H A Dlog2_norm.h109 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
H A DParallaxable.java23 * implement this interface to receive the current parallax fraction to use when
28 * @param fraction the vertical center point for the viewport, in the range [0,1]
30 void setParallaxFraction(float fraction); argument
/frameworks/av/media/libstagefright/codecs/amrwbenc/src/
H A Dlog2.c52 * 5- fraction = table[i]<<16 - (table[i] - table[i+1]) * a * 2
60 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
68 *fraction = 0;
75 a = (Word16)(L_x); /* Extract b10-b24 of fraction */
81 *fraction = extract_h (L_y);
101 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
107 Log2_norm ((L_x << exp), exp, exponent, fraction);
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/misc/
H A DRectFEvaluator.java30 * end Rect values, with <code>fraction</code> representing the proportion
37 * @param fraction The fraction from the starting to the ending values
41 * <code>fraction</code> parameter.
44 public RectF evaluate(float fraction, RectF startValue, RectF endValue) { argument
45 float left = startValue.left + ((endValue.left - startValue.left) * fraction);
46 float top = startValue.top + ((endValue.top - startValue.top) * fraction);
47 float right = startValue.right + ((endValue.right - startValue.right) * fraction);
48 float bottom = startValue.bottom + ((endValue.bottom - startValue.bottom) * fraction);
/frameworks/support/transition/src/android/support/transition/
H A DRectEvaluator.java60 * end Rect values, with <code>fraction</code> representing the proportion
69 * @param fraction The fraction from the starting to the ending values
73 * <code>fraction</code> parameter.
76 public Rect evaluate(float fraction, Rect startValue, Rect endValue) { argument
77 int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction);
78 int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction);
79 int right = startValue.right + (int) ((endValue.right - startValue.right) * fraction);
80 int bottom = startValue.bottom + (int) ((endValue.bottom - startValue.bottom) * fraction);
/frameworks/av/media/libstagefright/codecs/amrnb/common/src/
H A Dlog2_norm.cpp95 fraction = pointer to the fractional part of Log2 (of type Word16)
100 fraction points to the newly calculated fractional part of Log2
122 5. fraction = table[i]<<16 - (table[i] - table[i+1]) * a * 2
141 Word16 *fraction // (o) : Fractional part of Log2. (range: 0<=val<1)
150 *fraction = 0;
159 a = extract_l (L_x); // Extract b10-b24 of fraction
168 *fraction = extract_h (L_y);
200 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
209 *fraction = 0;
221 a = L_x & 0x7fff; /* Extract b10-b24 of fraction */
[all...]
/frameworks/support/design/base/android/support/design/widget/
H A DAnimationUtils.java35 * Linear interpolation between {@code startValue} and {@code endValue} by {@code fraction}.
37 static float lerp(float startValue, float endValue, float fraction) { argument
38 return startValue + (fraction * (endValue - startValue));
41 static int lerp(int startValue, int endValue, float fraction) { argument
42 return startValue + Math.round(fraction * (endValue - startValue));
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
H A DParallaxEffect.java35 * {@link ParallaxEffect#performMapping(Parallax)} which computes a fraction between 0 and 1
37 * on, the fraction increases from 0 at beginning to 1 at the end. Then the fraction is passed on
209 float fraction = 0;
221 fraction = calculateFraction(source);
223 target.update(fraction);
229 * This method is expected to compute a fraction between 0 and 1 based on the current values of
230 * variables in {@link Parallax}. As the parallax effect goes on, the fraction increases
247 * fraction inside a range to fraction o
252 getFractionWithWeightAdjusted(float fraction, int markerValueIndex) argument
[all...]
/frameworks/support/transition/api14/android/support/transition/
H A DPathProperty.java57 public void set(T target, Float fraction) { argument
58 mCurrentFraction = fraction;
59 mPathMeasure.getPosTan(mPathLength * fraction, mPosition, null);

Completed in 1240 milliseconds

123456