package o; import android.content.res.ColorStateList; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PathMeasure; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.graphics.Region; import android.graphics.Shader; import android.graphics.drawable.Drawable; import android.graphics.drawable.VectorDrawable; import android.util.AttributeSet; import android.util.TypedValue; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import java.io.IOException; import java.util.ArrayDeque; import java.util.ArrayList; import o.C0661Lpn; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; /* renamed from: o.kwa, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public class C16078kwa extends IFU { static final PorterDuff.Mode c = PorterDuff.Mode.SRC_IN; private ColorFilter a; private Drawable.ConstantState b; private boolean d; private final float[] f; private final Rect g; private final Matrix h; private boolean i; private PorterDuffColorFilter j; /* renamed from: o, reason: collision with root package name */ private ojQ f9195o; @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void applyTheme(Resources.Theme theme) { super.applyTheme(theme); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void clearColorFilter() { super.clearColorFilter(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ Drawable getCurrent() { return super.getCurrent(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ int getMinimumHeight() { return super.getMinimumHeight(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ int getMinimumWidth() { return super.getMinimumWidth(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ boolean getPadding(Rect rect) { return super.getPadding(rect); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ int[] getState() { return super.getState(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ Region getTransparentRegion() { return super.getTransparentRegion(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void jumpToCurrentState() { super.jumpToCurrentState(); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void setChangingConfigurations(int i) { super.setChangingConfigurations(i); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void setColorFilter(int i, PorterDuff.Mode mode) { super.setColorFilter(i, mode); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void setFilterBitmap(boolean z) { super.setFilterBitmap(z); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void setHotspot(float f, float f2) { super.setHotspot(f, f2); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ void setHotspotBounds(int i, int i2, int i3, int i4) { super.setHotspotBounds(i, i2, i3, i4); } @Override // o.IFU, android.graphics.drawable.Drawable public /* bridge */ /* synthetic */ boolean setState(int[] iArr) { return super.setState(iArr); } C16078kwa() { this.d = true; this.f = new float[9]; this.h = new Matrix(); this.g = new Rect(); this.f9195o = new ojQ(); } C16078kwa(ojQ ojq) { this.d = true; this.f = new float[9]; this.h = new Matrix(); this.g = new Rect(); this.f9195o = ojq; this.j = BH_(this.j, ojq.h, ojq.l); } @Override // android.graphics.drawable.Drawable public Drawable mutate() { if (this.e != null) { this.e.mutate(); return this; } if (!this.i && super.mutate() == this) { this.f9195o = new ojQ(this.f9195o); this.i = true; } return this; } public Object a(String str) { return this.f9195o.m.g.get(str); } @Override // android.graphics.drawable.Drawable public Drawable.ConstantState getConstantState() { if (this.e != null) { return new tOB(this.e.getConstantState()); } this.f9195o.j = getChangingConfigurations(); return this.f9195o; } @Override // android.graphics.drawable.Drawable public void draw(Canvas canvas) { if (this.e != null) { this.e.draw(canvas); return; } copyBounds(this.g); if (this.g.width() <= 0 || this.g.height() <= 0) { return; } ColorFilter colorFilter = this.a; if (colorFilter == null) { colorFilter = this.j; } canvas.getMatrix(this.h); this.h.getValues(this.f); float abs = Math.abs(this.f[0]); float abs2 = Math.abs(this.f[4]); float abs3 = Math.abs(this.f[1]); float abs4 = Math.abs(this.f[3]); if (abs3 != BitmapDescriptorFactory.HUE_RED || abs4 != BitmapDescriptorFactory.HUE_RED) { abs = 1.0f; abs2 = 1.0f; } int min = Math.min(2048, (int) (this.g.width() * abs)); int min2 = Math.min(2048, (int) (this.g.height() * abs2)); if (min <= 0 || min2 <= 0) { return; } int save = canvas.save(); canvas.translate(this.g.left, this.g.top); if (b()) { canvas.translate(this.g.width(), BitmapDescriptorFactory.HUE_RED); canvas.scale(-1.0f, 1.0f); } this.g.offsetTo(0, 0); this.f9195o.d(min, min2); if (!this.d) { this.f9195o.c(min, min2); } else if (!this.f9195o.b()) { this.f9195o.c(min, min2); this.f9195o.c(); } this.f9195o.BV_(canvas, colorFilter, this.g); canvas.restoreToCount(save); } @Override // android.graphics.drawable.Drawable public int getAlpha() { if (this.e != null) { return Tlu.pu_(this.e); } return this.f9195o.m.getRootAlpha(); } @Override // android.graphics.drawable.Drawable public void setAlpha(int i) { if (this.e != null) { this.e.setAlpha(i); } else if (this.f9195o.m.getRootAlpha() != i) { this.f9195o.m.setRootAlpha(i); invalidateSelf(); } } @Override // android.graphics.drawable.Drawable public void setColorFilter(ColorFilter colorFilter) { if (this.e != null) { this.e.setColorFilter(colorFilter); } else { this.a = colorFilter; invalidateSelf(); } } @Override // android.graphics.drawable.Drawable public ColorFilter getColorFilter() { return this.e != null ? Tlu.pv_(this.e) : this.a; } PorterDuffColorFilter BH_(PorterDuffColorFilter porterDuffColorFilter, ColorStateList colorStateList, PorterDuff.Mode mode) { if (colorStateList == null || mode == null) { return null; } return new PorterDuffColorFilter(colorStateList.getColorForState(getState(), 0), mode); } @Override // android.graphics.drawable.Drawable public void setTint(int i) { if (this.e != null) { Tlu.pE_(this.e, i); } else { setTintList(ColorStateList.valueOf(i)); } } @Override // android.graphics.drawable.Drawable public void setTintList(ColorStateList colorStateList) { if (this.e != null) { Tlu.pF_(this.e, colorStateList); return; } ojQ ojq = this.f9195o; if (ojq.h != colorStateList) { ojq.h = colorStateList; this.j = BH_(this.j, colorStateList, ojq.l); invalidateSelf(); } } @Override // android.graphics.drawable.Drawable public void setTintMode(PorterDuff.Mode mode) { if (this.e != null) { Tlu.pG_(this.e, mode); return; } ojQ ojq = this.f9195o; if (ojq.l != mode) { ojq.l = mode; this.j = BH_(this.j, ojq.h, mode); invalidateSelf(); } } @Override // android.graphics.drawable.Drawable public boolean isStateful() { ojQ ojq; if (this.e != null) { return this.e.isStateful(); } return super.isStateful() || ((ojq = this.f9195o) != null && (ojq.e() || (this.f9195o.h != null && this.f9195o.h.isStateful()))); } @Override // android.graphics.drawable.Drawable protected boolean onStateChange(int[] iArr) { boolean z; if (this.e != null) { return this.e.setState(iArr); } ojQ ojq = this.f9195o; if (ojq.h == null || ojq.l == null) { z = false; } else { this.j = BH_(this.j, ojq.h, ojq.l); invalidateSelf(); z = true; } if (!ojq.e() || !ojq.e(iArr)) { return z; } invalidateSelf(); return true; } @Override // android.graphics.drawable.Drawable public int getOpacity() { if (this.e != null) { return this.e.getOpacity(); } return -3; } @Override // android.graphics.drawable.Drawable public int getIntrinsicWidth() { if (this.e != null) { return this.e.getIntrinsicWidth(); } return (int) this.f9195o.m.a; } @Override // android.graphics.drawable.Drawable public int getIntrinsicHeight() { if (this.e != null) { return this.e.getIntrinsicHeight(); } return (int) this.f9195o.m.c; } @Override // android.graphics.drawable.Drawable public boolean canApplyTheme() { if (this.e == null) { return false; } Tlu.ps_(this.e); return false; } @Override // android.graphics.drawable.Drawable public boolean isAutoMirrored() { if (this.e != null) { return Tlu.py_(this.e); } return this.f9195o.c; } @Override // android.graphics.drawable.Drawable public void setAutoMirrored(boolean z) { if (this.e != null) { Tlu.pA_(this.e, z); } else { this.f9195o.c = z; } } public static C16078kwa BD_(Resources resources, int i, Resources.Theme theme) { C16078kwa c16078kwa = new C16078kwa(); c16078kwa.e = kVs.nZ_(resources, i, theme); c16078kwa.b = new tOB(c16078kwa.e.getConstantState()); return c16078kwa; } static int a(int i, float f) { return (((int) (Color.alpha(i) * f)) << 24) | (16777215 & i); } @Override // android.graphics.drawable.Drawable public void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet) throws XmlPullParserException, IOException { if (this.e != null) { this.e.inflate(resources, xmlPullParser, attributeSet); } else { inflate(resources, xmlPullParser, attributeSet, null); } } @Override // android.graphics.drawable.Drawable public void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet, Resources.Theme theme) throws XmlPullParserException, IOException { TypedArray obtainStyledAttributes; if (this.e != null) { Tlu.px_(this.e, resources, xmlPullParser, attributeSet, theme); return; } ojQ ojq = this.f9195o; ojq.m = new ZqN(); int[] iArr = C0363FHj.f; if (theme == null) { obtainStyledAttributes = resources.obtainAttributes(attributeSet, iArr); } else { obtainStyledAttributes = theme.obtainStyledAttributes(attributeSet, iArr, 0, 0); } BG_(obtainStyledAttributes, xmlPullParser, theme); obtainStyledAttributes.recycle(); ojq.j = getChangingConfigurations(); ojq.a = true; BE_(resources, xmlPullParser, attributeSet, theme); this.j = BH_(this.j, ojq.h, ojq.l); } private static PorterDuff.Mode BF_(int i, PorterDuff.Mode mode) { if (i == 3) { return PorterDuff.Mode.SRC_OVER; } if (i == 5) { return PorterDuff.Mode.SRC_IN; } if (i == 9) { return PorterDuff.Mode.SRC_ATOP; } switch (i) { case 14: return PorterDuff.Mode.MULTIPLY; case 15: return PorterDuff.Mode.SCREEN; case 16: return PorterDuff.Mode.ADD; default: return mode; } } private void BG_(TypedArray typedArray, XmlPullParser xmlPullParser, Resources.Theme theme) throws XmlPullParserException { ColorStateList colorStateList; ojQ ojq = this.f9195o; ZqN zqN = ojq.m; ojq.l = BF_(C2447ael.oy_(typedArray, xmlPullParser, "tintMode", 6, -1), PorterDuff.Mode.SRC_IN); if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "tint") != null) { TypedValue typedValue = new TypedValue(); typedArray.getValue(1, typedValue); if (typedValue.type == 2) { throw new UnsupportedOperationException("Failed to resolve attribute at index 1: ".concat(String.valueOf(typedValue))); } if (typedValue.type < 28 || typedValue.type > 31) { colorStateList = kFD.nB_(typedArray.getResources(), typedArray.getResourceId(1, 0), theme); } else { colorStateList = ColorStateList.valueOf(typedValue.data); } } else { colorStateList = null; } if (colorStateList != null) { ojq.h = colorStateList; } ojq.c = C2447ael.ov_(typedArray, xmlPullParser, "autoMirrored", 5, ojq.c); zqN.k = C2447ael.ox_(typedArray, xmlPullParser, "viewportWidth", 7, zqN.k); zqN.h = C2447ael.ox_(typedArray, xmlPullParser, "viewportHeight", 8, zqN.h); if (zqN.k <= BitmapDescriptorFactory.HUE_RED) { StringBuilder sb = new StringBuilder(); sb.append(typedArray.getPositionDescription()); sb.append(" tag requires viewportWidth > 0"); throw new XmlPullParserException(sb.toString()); } if (zqN.h <= BitmapDescriptorFactory.HUE_RED) { StringBuilder sb2 = new StringBuilder(); sb2.append(typedArray.getPositionDescription()); sb2.append(" tag requires viewportHeight > 0"); throw new XmlPullParserException(sb2.toString()); } zqN.a = typedArray.getDimension(3, zqN.a); zqN.c = typedArray.getDimension(2, zqN.c); if (zqN.a <= BitmapDescriptorFactory.HUE_RED) { StringBuilder sb3 = new StringBuilder(); sb3.append(typedArray.getPositionDescription()); sb3.append(" tag requires width > 0"); throw new XmlPullParserException(sb3.toString()); } if (zqN.c <= BitmapDescriptorFactory.HUE_RED) { StringBuilder sb4 = new StringBuilder(); sb4.append(typedArray.getPositionDescription()); sb4.append(" tag requires height > 0"); throw new XmlPullParserException(sb4.toString()); } zqN.setAlpha(C2447ael.ox_(typedArray, xmlPullParser, "alpha", 4, zqN.getAlpha())); String string = typedArray.getString(0); if (string != null) { zqN.f = string; zqN.g.put(string, zqN); } } private void BE_(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet, Resources.Theme theme) throws XmlPullParserException, IOException { ojQ ojq = this.f9195o; ZqN zqN = ojq.m; ArrayDeque arrayDeque = new ArrayDeque(); arrayDeque.push(zqN.j); int eventType = xmlPullParser.getEventType(); int depth = xmlPullParser.getDepth(); boolean z = true; while (eventType != 1 && (xmlPullParser.getDepth() >= depth + 1 || eventType != 3)) { if (eventType == 2) { String name = xmlPullParser.getName(); IeS ieS = (IeS) arrayDeque.peek(); if ("path".equals(name)) { LWm lWm = new LWm(); lWm.BN_(resources, attributeSet, theme, xmlPullParser); ieS.e.add(lWm); if (lWm.getPathName() != null) { zqN.g.put(lWm.getPathName(), lWm); } ojq.j = lWm.k | ojq.j; z = false; } else if ("clip-path".equals(name)) { HBt hBt = new HBt(); hBt.BJ_(resources, attributeSet, theme, xmlPullParser); ieS.e.add(hBt); if (hBt.getPathName() != null) { zqN.g.put(hBt.getPathName(), hBt); } ojq.j = hBt.k | ojq.j; } else if ("group".equals(name)) { IeS ieS2 = new IeS(); ieS2.BP_(resources, attributeSet, theme, xmlPullParser); ieS.e.add(ieS2); arrayDeque.push(ieS2); if (ieS2.getGroupName() != null) { zqN.g.put(ieS2.getGroupName(), ieS2); } ojq.j = ieS2.c | ojq.j; } } else if (eventType == 3 && "group".equals(xmlPullParser.getName())) { arrayDeque.pop(); } eventType = xmlPullParser.next(); } if (z) { throw new XmlPullParserException("no path defined"); } } private boolean b() { return isAutoMirrored() && Tlu.pw_(this) == 1; } @Override // o.IFU, android.graphics.drawable.Drawable protected void onBoundsChange(Rect rect) { if (this.e != null) { this.e.setBounds(rect); } } @Override // android.graphics.drawable.Drawable public int getChangingConfigurations() { if (this.e != null) { return this.e.getChangingConfigurations(); } return super.getChangingConfigurations() | this.f9195o.getChangingConfigurations(); } @Override // android.graphics.drawable.Drawable public void invalidateSelf() { if (this.e != null) { this.e.invalidateSelf(); } else { super.invalidateSelf(); } } @Override // android.graphics.drawable.Drawable public void scheduleSelf(Runnable runnable, long j) { if (this.e != null) { this.e.scheduleSelf(runnable, j); } else { super.scheduleSelf(runnable, j); } } @Override // android.graphics.drawable.Drawable public boolean setVisible(boolean z, boolean z2) { if (this.e != null) { return this.e.setVisible(z, z2); } return super.setVisible(z, z2); } @Override // android.graphics.drawable.Drawable public void unscheduleSelf(Runnable runnable) { if (this.e != null) { this.e.unscheduleSelf(runnable); } else { super.unscheduleSelf(runnable); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$tOB */ /* loaded from: classes.dex */ public static class tOB extends Drawable.ConstantState { private final Drawable.ConstantState b; public tOB(Drawable.ConstantState constantState) { this.b = constantState; } @Override // android.graphics.drawable.Drawable.ConstantState public Drawable newDrawable() { C16078kwa c16078kwa = new C16078kwa(); c16078kwa.e = (VectorDrawable) this.b.newDrawable(); return c16078kwa; } @Override // android.graphics.drawable.Drawable.ConstantState public Drawable newDrawable(Resources resources) { C16078kwa c16078kwa = new C16078kwa(); c16078kwa.e = (VectorDrawable) this.b.newDrawable(resources); return c16078kwa; } @Override // android.graphics.drawable.Drawable.ConstantState public Drawable newDrawable(Resources resources, Resources.Theme theme) { C16078kwa c16078kwa = new C16078kwa(); c16078kwa.e = (VectorDrawable) this.b.newDrawable(resources, theme); return c16078kwa; } @Override // android.graphics.drawable.Drawable.ConstantState public boolean canApplyTheme() { return this.b.canApplyTheme(); } @Override // android.graphics.drawable.Drawable.ConstantState public int getChangingConfigurations() { return this.b.getChangingConfigurations(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$ojQ */ /* loaded from: classes.dex */ public static class ojQ extends Drawable.ConstantState { boolean a; boolean b; boolean c; int d; Bitmap e; ColorStateList f; Paint g; ColorStateList h; PorterDuff.Mode i; int j; PorterDuff.Mode l; ZqN m; public ojQ(ojQ ojq) { this.h = null; this.l = C16078kwa.c; if (ojq != null) { this.j = ojq.j; this.m = new ZqN(ojq.m); if (ojq.m.d != null) { this.m.d = new Paint(ojq.m.d); } if (ojq.m.i != null) { this.m.i = new Paint(ojq.m.i); } this.h = ojq.h; this.l = ojq.l; this.c = ojq.c; } } public void BV_(Canvas canvas, ColorFilter colorFilter, Rect rect) { canvas.drawBitmap(this.e, (Rect) null, rect, BW_(colorFilter)); } public boolean a() { return this.m.getRootAlpha() < 255; } public Paint BW_(ColorFilter colorFilter) { if (!a() && colorFilter == null) { return null; } if (this.g == null) { Paint paint = new Paint(); this.g = paint; paint.setFilterBitmap(true); } this.g.setAlpha(this.m.getRootAlpha()); this.g.setColorFilter(colorFilter); return this.g; } public void c(int i, int i2) { this.e.eraseColor(0); this.m.BU_(new Canvas(this.e), i, i2, null); } public void d(int i, int i2) { if (this.e == null || !b(i, i2)) { this.e = Bitmap.createBitmap(i, i2, Bitmap.Config.ARGB_8888); this.a = true; } } public boolean b(int i, int i2) { return i == this.e.getWidth() && i2 == this.e.getHeight(); } public boolean b() { return !this.a && this.f == this.h && this.i == this.l && this.b == this.c && this.d == this.m.getRootAlpha(); } public void c() { this.f = this.h; this.i = this.l; this.d = this.m.getRootAlpha(); this.b = this.c; this.a = false; } public ojQ() { this.h = null; this.l = C16078kwa.c; this.m = new ZqN(); } @Override // android.graphics.drawable.Drawable.ConstantState public Drawable newDrawable() { return new C16078kwa(this); } @Override // android.graphics.drawable.Drawable.ConstantState public Drawable newDrawable(Resources resources) { return new C16078kwa(this); } public boolean e() { return this.m.a(); } public boolean e(int[] iArr) { boolean e = this.m.e(iArr); this.a |= e; return e; } @Override // android.graphics.drawable.Drawable.ConstantState public int getChangingConfigurations() { return this.j; } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$ZqN */ /* loaded from: classes.dex */ public static class ZqN { /* renamed from: o, reason: collision with root package name */ private static final Matrix f9198o = new Matrix(); float a; Boolean b; float c; Paint d; int e; String f; final nyh g; float h; Paint i; final IeS j; float k; private final Matrix l; private final Path m; private int n; private final Path p; private PathMeasure r; private static float d(float f, float f2, float f3, float f4) { return (f * f4) - (f2 * f3); } public ZqN() { this.l = new Matrix(); this.a = BitmapDescriptorFactory.HUE_RED; this.c = BitmapDescriptorFactory.HUE_RED; this.k = BitmapDescriptorFactory.HUE_RED; this.h = BitmapDescriptorFactory.HUE_RED; this.e = 255; this.f = null; this.b = null; this.g = new nyh<>(); this.j = new IeS(); this.m = new Path(); this.p = new Path(); } public void setAlpha(float f) { setRootAlpha((int) (f * 255.0f)); } public float getAlpha() { return getRootAlpha() / 255.0f; } public ZqN(ZqN zqN) { this.l = new Matrix(); this.a = BitmapDescriptorFactory.HUE_RED; this.c = BitmapDescriptorFactory.HUE_RED; this.k = BitmapDescriptorFactory.HUE_RED; this.h = BitmapDescriptorFactory.HUE_RED; this.e = 255; this.f = null; this.b = null; nyh nyhVar = new nyh<>(); this.g = nyhVar; this.j = new IeS(zqN.j, nyhVar); this.m = new Path(zqN.m); this.p = new Path(zqN.p); this.a = zqN.a; this.c = zqN.c; this.k = zqN.k; this.h = zqN.h; this.n = zqN.n; this.e = zqN.e; this.f = zqN.f; String str = zqN.f; if (str != null) { nyhVar.put(str, this); } this.b = zqN.b; } private void BR_(IeS ieS, Matrix matrix, Canvas canvas, int i, int i2, ColorFilter colorFilter) { ieS.d.set(matrix); ieS.d.preConcat(ieS.a); canvas.save(); for (int i3 = 0; i3 < ieS.e.size(); i3++) { Sts sts = ieS.e.get(i3); if (sts instanceof IeS) { BR_((IeS) sts, ieS.d, canvas, i, i2, colorFilter); } else if (sts instanceof RVV) { BS_(ieS, (RVV) sts, canvas, i, i2, colorFilter); } } canvas.restore(); } public void BU_(Canvas canvas, int i, int i2, ColorFilter colorFilter) { BR_(this.j, f9198o, canvas, i, i2, colorFilter); } private void BS_(IeS ieS, RVV rvv, Canvas canvas, int i, int i2, ColorFilter colorFilter) { float f; float f2 = i / this.k; float f3 = i2 / this.h; float min = Math.min(f2, f3); Matrix matrix = ieS.d; this.l.set(matrix); this.l.postScale(f2, f3); float BT_ = BT_(matrix); if (BT_ == BitmapDescriptorFactory.HUE_RED) { return; } rvv.BQ_(this.m); Path path = this.m; this.p.reset(); if (rvv.b()) { this.p.setFillType(rvv.l == 0 ? Path.FillType.WINDING : Path.FillType.EVEN_ODD); this.p.addPath(path, this.l); canvas.clipPath(this.p); return; } LWm lWm = (LWm) rvv; if (lWm.f9197o != BitmapDescriptorFactory.HUE_RED || lWm.f != 1.0f) { float f4 = lWm.f9197o; float f5 = lWm.g; float f6 = lWm.f; float f7 = lWm.g; if (this.r == null) { this.r = new PathMeasure(); } this.r.setPath(this.m, false); float length = this.r.getLength(); float f8 = ((f4 + f5) % 1.0f) * length; float f9 = ((f6 + f7) % 1.0f) * length; path.reset(); if (f8 > f9) { this.r.getSegment(f8, length, path, true); PathMeasure pathMeasure = this.r; f = BitmapDescriptorFactory.HUE_RED; pathMeasure.getSegment(BitmapDescriptorFactory.HUE_RED, f9, path, true); } else { f = BitmapDescriptorFactory.HUE_RED; this.r.getSegment(f8, f9, path, true); } path.rLineTo(f, f); } this.p.addPath(path, this.l); if (lWm.d.d()) { C2854amU c2854amU = lWm.d; if (this.d == null) { Paint paint = new Paint(1); this.d = paint; paint.setStyle(Paint.Style.FILL); } Paint paint2 = this.d; if (c2854amU.e()) { Shader nJ_ = c2854amU.nJ_(); nJ_.setLocalMatrix(this.l); paint2.setShader(nJ_); paint2.setAlpha(Math.round(lWm.c * 255.0f)); } else { paint2.setShader(null); paint2.setAlpha(255); paint2.setColor(C16078kwa.a(c2854amU.b(), lWm.c)); } paint2.setColorFilter(colorFilter); this.p.setFillType(lWm.l == 0 ? Path.FillType.WINDING : Path.FillType.EVEN_ODD); canvas.drawPath(this.p, paint2); } if (lWm.b.d()) { C2854amU c2854amU2 = lWm.b; if (this.i == null) { Paint paint3 = new Paint(1); this.i = paint3; paint3.setStyle(Paint.Style.STROKE); } Paint paint4 = this.i; if (lWm.j != null) { paint4.setStrokeJoin(lWm.j); } if (lWm.e != null) { paint4.setStrokeCap(lWm.e); } paint4.setStrokeMiter(lWm.i); if (c2854amU2.e()) { Shader nJ_2 = c2854amU2.nJ_(); nJ_2.setLocalMatrix(this.l); paint4.setShader(nJ_2); paint4.setAlpha(Math.round(lWm.a * 255.0f)); } else { paint4.setShader(null); paint4.setAlpha(255); paint4.setColor(C16078kwa.a(c2854amU2.b(), lWm.a)); } paint4.setColorFilter(colorFilter); paint4.setStrokeWidth(lWm.h * min * BT_); canvas.drawPath(this.p, paint4); } } private float BT_(Matrix matrix) { float[] fArr = {BitmapDescriptorFactory.HUE_RED, 1.0f, 1.0f, BitmapDescriptorFactory.HUE_RED}; matrix.mapVectors(fArr); float hypot = (float) Math.hypot(fArr[0], fArr[1]); float hypot2 = (float) Math.hypot(fArr[2], fArr[3]); float d = d(fArr[0], fArr[1], fArr[2], fArr[3]); float max = Math.max(hypot, hypot2); return max > BitmapDescriptorFactory.HUE_RED ? Math.abs(d) / max : BitmapDescriptorFactory.HUE_RED; } public boolean a() { if (this.b == null) { this.b = Boolean.valueOf(this.j.d()); } return this.b.booleanValue(); } public boolean e(int[] iArr) { return this.j.e(iArr); } public void setRootAlpha(int i) { this.e = i; } public int getRootAlpha() { return this.e; } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$Sts */ /* loaded from: classes.dex */ public static abstract class Sts { public boolean d() { return false; } public boolean e(int[] iArr) { return false; } private Sts() { } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$IeS */ /* loaded from: classes.dex */ public static class IeS extends Sts { final Matrix a; float b; int c; final Matrix d; final ArrayList e; private String f; private float g; private float h; private float i; private float j; private int[] m; private float n; /* renamed from: o, reason: collision with root package name */ private float f9196o; public IeS(IeS ieS, nyh nyhVar) { super(); RVV hBt; this.d = new Matrix(); this.e = new ArrayList<>(); this.b = BitmapDescriptorFactory.HUE_RED; this.i = BitmapDescriptorFactory.HUE_RED; this.g = BitmapDescriptorFactory.HUE_RED; this.h = 1.0f; this.j = 1.0f; this.f9196o = BitmapDescriptorFactory.HUE_RED; this.n = BitmapDescriptorFactory.HUE_RED; Matrix matrix = new Matrix(); this.a = matrix; this.f = null; this.b = ieS.b; this.i = ieS.i; this.g = ieS.g; this.h = ieS.h; this.j = ieS.j; this.f9196o = ieS.f9196o; this.n = ieS.n; this.m = ieS.m; String str = ieS.f; this.f = str; this.c = ieS.c; if (str != null) { nyhVar.put(str, this); } matrix.set(ieS.a); ArrayList arrayList = ieS.e; for (int i = 0; i < arrayList.size(); i++) { Sts sts = arrayList.get(i); if (sts instanceof IeS) { this.e.add(new IeS((IeS) sts, nyhVar)); } else { if (sts instanceof LWm) { hBt = new LWm((LWm) sts); } else if (sts instanceof HBt) { hBt = new HBt((HBt) sts); } else { throw new IllegalStateException("Unknown object in the tree!"); } this.e.add(hBt); if (hBt.n != null) { nyhVar.put(hBt.n, hBt); } } } } public IeS() { super(); this.d = new Matrix(); this.e = new ArrayList<>(); this.b = BitmapDescriptorFactory.HUE_RED; this.i = BitmapDescriptorFactory.HUE_RED; this.g = BitmapDescriptorFactory.HUE_RED; this.h = 1.0f; this.j = 1.0f; this.f9196o = BitmapDescriptorFactory.HUE_RED; this.n = BitmapDescriptorFactory.HUE_RED; this.a = new Matrix(); this.f = null; } public void BP_(Resources resources, AttributeSet attributeSet, Resources.Theme theme, XmlPullParser xmlPullParser) { TypedArray obtainStyledAttributes; int[] iArr = C0363FHj.a; if (theme == null) { obtainStyledAttributes = resources.obtainAttributes(attributeSet, iArr); } else { obtainStyledAttributes = theme.obtainStyledAttributes(attributeSet, iArr, 0, 0); } BO_(obtainStyledAttributes, xmlPullParser); obtainStyledAttributes.recycle(); } private void BO_(TypedArray typedArray, XmlPullParser xmlPullParser) { this.m = null; this.b = C2447ael.ox_(typedArray, xmlPullParser, "rotation", 5, this.b); this.i = typedArray.getFloat(1, this.i); this.g = typedArray.getFloat(2, this.g); this.h = C2447ael.ox_(typedArray, xmlPullParser, "scaleX", 3, this.h); this.j = C2447ael.ox_(typedArray, xmlPullParser, "scaleY", 4, this.j); this.f9196o = C2447ael.ox_(typedArray, xmlPullParser, "translateX", 6, this.f9196o); this.n = C2447ael.ox_(typedArray, xmlPullParser, "translateY", 7, this.n); String string = typedArray.getString(0); if (string != null) { this.f = string; } a(); } private void a() { this.a.reset(); this.a.postTranslate(-this.i, -this.g); this.a.postScale(this.h, this.j); this.a.postRotate(this.b, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED); this.a.postTranslate(this.f9196o + this.i, this.n + this.g); } public void setRotation(float f) { if (f != this.b) { this.b = f; a(); } } public void setPivotX(float f) { if (f != this.i) { this.i = f; a(); } } public void setPivotY(float f) { if (f != this.g) { this.g = f; a(); } } public void setScaleX(float f) { if (f != this.h) { this.h = f; a(); } } public void setScaleY(float f) { if (f != this.j) { this.j = f; a(); } } public void setTranslateX(float f) { if (f != this.f9196o) { this.f9196o = f; a(); } } public void setTranslateY(float f) { if (f != this.n) { this.n = f; a(); } } @Override // o.C16078kwa.Sts public boolean d() { for (int i = 0; i < this.e.size(); i++) { if (this.e.get(i).d()) { return true; } } return false; } @Override // o.C16078kwa.Sts public boolean e(int[] iArr) { boolean z = false; for (int i = 0; i < this.e.size(); i++) { z |= this.e.get(i).e(iArr); } return z; } public float getTranslateY() { return this.n; } public float getTranslateX() { return this.f9196o; } public float getScaleY() { return this.j; } public float getScaleX() { return this.h; } public float getRotation() { return this.b; } public float getPivotY() { return this.g; } public float getPivotX() { return this.i; } public Matrix getLocalMatrix() { return this.a; } public String getGroupName() { return this.f; } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$RVV */ /* loaded from: classes.dex */ public static abstract class RVV extends Sts { int k; int l; protected C0661Lpn.HBt[] m; String n; public boolean b() { return false; } public RVV() { super(); this.m = null; this.l = 0; } public RVV(RVV rvv) { super(); this.m = null; this.l = 0; this.n = rvv.n; this.k = rvv.k; this.m = C0661Lpn.c(rvv.m); } public void BQ_(Path path) { path.reset(); C0661Lpn.HBt[] hBtArr = this.m; if (hBtArr != null) { C0661Lpn.HBt.oI_(hBtArr, path); } } public void setPathData(C0661Lpn.HBt[] hBtArr) { int i; C0661Lpn.HBt[] hBtArr2 = this.m; if (hBtArr2 != null && hBtArr != null && hBtArr2.length == hBtArr.length) { for (0; i < hBtArr2.length; i + 1) { i = (hBtArr2[i].b == hBtArr[i].b && hBtArr2[i].c.length == hBtArr[i].c.length) ? i + 1 : 0; } C0661Lpn.HBt[] hBtArr3 = this.m; for (int i2 = 0; i2 < hBtArr.length; i2++) { hBtArr3[i2].b = hBtArr[i2].b; for (int i3 = 0; i3 < hBtArr[i2].c.length; i3++) { hBtArr3[i2].c[i3] = hBtArr[i2].c[i3]; } } return; } this.m = C0661Lpn.c(hBtArr); } public String getPathName() { return this.n; } public C0661Lpn.HBt[] getPathData() { return this.m; } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$HBt */ /* loaded from: classes.dex */ public static class HBt extends RVV { @Override // o.C16078kwa.RVV public boolean b() { return true; } HBt() { } HBt(HBt hBt) { super(hBt); } public void BJ_(Resources resources, AttributeSet attributeSet, Resources.Theme theme, XmlPullParser xmlPullParser) { TypedArray obtainStyledAttributes; if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "pathData") != null) { int[] iArr = C0363FHj.c; if (theme == null) { obtainStyledAttributes = resources.obtainAttributes(attributeSet, iArr); } else { obtainStyledAttributes = theme.obtainStyledAttributes(attributeSet, iArr, 0, 0); } BI_(obtainStyledAttributes, xmlPullParser); obtainStyledAttributes.recycle(); } } private void BI_(TypedArray typedArray, XmlPullParser xmlPullParser) { String string = typedArray.getString(0); if (string != null) { this.n = string; } String string2 = typedArray.getString(1); if (string2 != null) { this.m = C0661Lpn.c(string2); } this.l = C2447ael.oy_(typedArray, xmlPullParser, "fillType", 2, 0); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.kwa$LWm */ /* loaded from: classes.dex */ public static class LWm extends RVV { float a; C2854amU b; float c; C2854amU d; Paint.Cap e; float f; float g; float h; float i; Paint.Join j; /* renamed from: o, reason: collision with root package name */ float f9197o; private int[] r; LWm() { this.h = BitmapDescriptorFactory.HUE_RED; this.a = 1.0f; this.c = 1.0f; this.f9197o = BitmapDescriptorFactory.HUE_RED; this.f = 1.0f; this.g = BitmapDescriptorFactory.HUE_RED; this.e = Paint.Cap.BUTT; this.j = Paint.Join.MITER; this.i = 4.0f; } LWm(LWm lWm) { super(lWm); this.h = BitmapDescriptorFactory.HUE_RED; this.a = 1.0f; this.c = 1.0f; this.f9197o = BitmapDescriptorFactory.HUE_RED; this.f = 1.0f; this.g = BitmapDescriptorFactory.HUE_RED; this.e = Paint.Cap.BUTT; this.j = Paint.Join.MITER; this.i = 4.0f; this.r = lWm.r; this.b = lWm.b; this.h = lWm.h; this.a = lWm.a; this.d = lWm.d; this.l = lWm.l; this.c = lWm.c; this.f9197o = lWm.f9197o; this.f = lWm.f; this.g = lWm.g; this.e = lWm.e; this.j = lWm.j; this.i = lWm.i; } private Paint.Cap BK_(int i, Paint.Cap cap) { if (i == 0) { return Paint.Cap.BUTT; } if (i != 1) { return i != 2 ? cap : Paint.Cap.SQUARE; } return Paint.Cap.ROUND; } private Paint.Join BL_(int i, Paint.Join join) { if (i == 0) { return Paint.Join.MITER; } if (i != 1) { return i != 2 ? join : Paint.Join.BEVEL; } return Paint.Join.ROUND; } public void BN_(Resources resources, AttributeSet attributeSet, Resources.Theme theme, XmlPullParser xmlPullParser) { TypedArray obtainStyledAttributes; int[] iArr = C0363FHj.e; if (theme == null) { obtainStyledAttributes = resources.obtainAttributes(attributeSet, iArr); } else { obtainStyledAttributes = theme.obtainStyledAttributes(attributeSet, iArr, 0, 0); } BM_(obtainStyledAttributes, xmlPullParser, theme); obtainStyledAttributes.recycle(); } private void BM_(TypedArray typedArray, XmlPullParser xmlPullParser, Resources.Theme theme) { this.r = null; if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "pathData") != null) { String string = typedArray.getString(0); if (string != null) { this.n = string; } String string2 = typedArray.getString(2); if (string2 != null) { this.m = C0661Lpn.c(string2); } this.d = C2447ael.ow_(typedArray, xmlPullParser, theme, "fillColor", 1); this.c = C2447ael.ox_(typedArray, xmlPullParser, "fillAlpha", 12, this.c); this.e = BK_(C2447ael.oy_(typedArray, xmlPullParser, "strokeLineCap", 8, -1), this.e); this.j = BL_(C2447ael.oy_(typedArray, xmlPullParser, "strokeLineJoin", 9, -1), this.j); this.i = C2447ael.ox_(typedArray, xmlPullParser, "strokeMiterLimit", 10, this.i); this.b = C2447ael.ow_(typedArray, xmlPullParser, theme, "strokeColor", 3); this.a = C2447ael.ox_(typedArray, xmlPullParser, "strokeAlpha", 11, this.a); this.h = C2447ael.ox_(typedArray, xmlPullParser, "strokeWidth", 4, this.h); this.f = C2447ael.ox_(typedArray, xmlPullParser, "trimPathEnd", 6, this.f); this.g = C2447ael.ox_(typedArray, xmlPullParser, "trimPathOffset", 7, this.g); this.f9197o = C2447ael.ox_(typedArray, xmlPullParser, "trimPathStart", 5, this.f9197o); this.l = C2447ael.oy_(typedArray, xmlPullParser, "fillType", 13, this.l); } } @Override // o.C16078kwa.Sts public boolean d() { return this.d.c() || this.b.c(); } @Override // o.C16078kwa.Sts public boolean e(int[] iArr) { return this.b.a(iArr) | this.d.a(iArr); } int getStrokeColor() { return this.b.b(); } void setStrokeColor(int i) { this.b.a(i); } int getFillColor() { return this.d.b(); } void setFillColor(int i) { this.d.a(i); } void setTrimPathStart(float f) { this.f9197o = f; } void setTrimPathOffset(float f) { this.g = f; } void setTrimPathEnd(float f) { this.f = f; } void setStrokeWidth(float f) { this.h = f; } void setStrokeAlpha(float f) { this.a = f; } void setFillAlpha(float f) { this.c = f; } float getTrimPathStart() { return this.f9197o; } float getTrimPathOffset() { return this.g; } float getTrimPathEnd() { return this.f; } float getStrokeWidth() { return this.h; } float getStrokeAlpha() { return this.a; } float getFillAlpha() { return this.c; } } public void a(boolean z) { this.d = z; } }