100 lines
3.0 KiB
Java
100 lines
3.0 KiB
Java
|
package o;
|
||
|
|
||
|
import android.graphics.Canvas;
|
||
|
import android.graphics.ColorFilter;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
|
||
|
/* renamed from: o.axc, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C3441axc extends Drawable {
|
||
|
private final Drawable a;
|
||
|
private float b;
|
||
|
private final Drawable c;
|
||
|
private final float[] e;
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final int getOpacity() {
|
||
|
return -3;
|
||
|
}
|
||
|
|
||
|
public C3441axc(Drawable drawable, Drawable drawable2) {
|
||
|
this.a = drawable.getConstantState().newDrawable().mutate();
|
||
|
Drawable mutate = drawable2.getConstantState().newDrawable().mutate();
|
||
|
this.c = mutate;
|
||
|
mutate.setAlpha(0);
|
||
|
this.e = new float[2];
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final void draw(Canvas canvas) {
|
||
|
this.a.draw(canvas);
|
||
|
this.c.draw(canvas);
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final void setBounds(int i, int i2, int i3, int i4) {
|
||
|
super.setBounds(i, i2, i3, i4);
|
||
|
this.a.setBounds(i, i2, i3, i4);
|
||
|
this.c.setBounds(i, i2, i3, i4);
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final int getIntrinsicWidth() {
|
||
|
return Math.max(this.a.getIntrinsicWidth(), this.c.getIntrinsicWidth());
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final int getIntrinsicHeight() {
|
||
|
return Math.max(this.a.getIntrinsicHeight(), this.c.getIntrinsicHeight());
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final int getMinimumWidth() {
|
||
|
return Math.max(this.a.getMinimumWidth(), this.c.getMinimumWidth());
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final int getMinimumHeight() {
|
||
|
return Math.max(this.a.getMinimumHeight(), this.c.getMinimumHeight());
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final void setAlpha(int i) {
|
||
|
if (this.b <= 0.5f) {
|
||
|
this.a.setAlpha(i);
|
||
|
this.c.setAlpha(0);
|
||
|
} else {
|
||
|
this.a.setAlpha(0);
|
||
|
this.c.setAlpha(i);
|
||
|
}
|
||
|
invalidateSelf();
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final void setColorFilter(ColorFilter colorFilter) {
|
||
|
this.a.setColorFilter(colorFilter);
|
||
|
this.c.setColorFilter(colorFilter);
|
||
|
invalidateSelf();
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final boolean isStateful() {
|
||
|
return this.a.isStateful() || this.c.isStateful();
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public final boolean setState(int[] iArr) {
|
||
|
return this.a.setState(iArr) || this.c.setState(iArr);
|
||
|
}
|
||
|
|
||
|
public final void e(float f) {
|
||
|
if (this.b != f) {
|
||
|
this.b = f;
|
||
|
zMS.e(f, this.e);
|
||
|
this.a.setAlpha((int) (this.e[0] * 255.0f));
|
||
|
this.c.setAlpha((int) (this.e[1] * 255.0f));
|
||
|
invalidateSelf();
|
||
|
}
|
||
|
}
|
||
|
}
|