ADD week 5
This commit is contained in:
30
02-Easy5/E5/sources/androidx/transition/RectEvaluator.java
Normal file
30
02-Easy5/E5/sources/androidx/transition/RectEvaluator.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package androidx.transition;
|
||||
|
||||
import android.animation.TypeEvaluator;
|
||||
import android.graphics.Rect;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
class RectEvaluator implements TypeEvaluator<Rect> {
|
||||
private Rect mRect;
|
||||
|
||||
RectEvaluator() {
|
||||
}
|
||||
|
||||
RectEvaluator(Rect rect) {
|
||||
this.mRect = rect;
|
||||
}
|
||||
|
||||
@Override // android.animation.TypeEvaluator
|
||||
public Rect evaluate(float f, Rect rect, Rect rect2) {
|
||||
int i = rect.left + ((int) ((rect2.left - rect.left) * f));
|
||||
int i2 = rect.top + ((int) ((rect2.top - rect.top) * f));
|
||||
int i3 = rect.right + ((int) ((rect2.right - rect.right) * f));
|
||||
int i4 = rect.bottom + ((int) ((rect2.bottom - rect.bottom) * f));
|
||||
Rect rect3 = this.mRect;
|
||||
if (rect3 == null) {
|
||||
return new Rect(i, i2, i3, i4);
|
||||
}
|
||||
rect3.set(i, i2, i3, i4);
|
||||
return this.mRect;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user