discord-jadx/app/src/main/java/c/c/a/w/b/f.java

133 lines
3.7 KiB
Java

package c.c.a.w.b;
import android.graphics.Path;
import android.graphics.PointF;
import androidx.annotation.Nullable;
import c.c.a.c0.c;
import c.c.a.j;
import c.c.a.o;
import c.c.a.w.c.a;
import c.c.a.y.m.b;
import java.util.List;
/* compiled from: EllipseContent */
public class f implements m, a.b, k {
public final Path a = new Path();
public final String b;
/* renamed from: c reason: collision with root package name */
public final j f277c;
public final a<?, PointF> d;
public final a<?, PointF> e;
public final c.c.a.y.l.a f;
public b g = new b();
public boolean h;
public f(j jVar, b bVar, c.c.a.y.l.a aVar) {
this.b = aVar.a;
this.f277c = jVar;
a<PointF, PointF> a = aVar.f309c.a();
this.d = a;
a<PointF, PointF> a2 = aVar.b.a();
this.e = a2;
this.f = aVar;
bVar.e(a);
bVar.e(a2);
a.a.add(this);
a2.a.add(this);
}
@Override // c.c.a.w.c.a.b
public void a() {
this.h = false;
this.f277c.invalidateSelf();
}
@Override // c.c.a.w.b.c
public void b(List<c> list, List<c> list2) {
for (int i = 0; i < list.size(); i++) {
c cVar = list.get(i);
if (cVar instanceof s) {
s sVar = (s) cVar;
if (sVar.f289c == 1) {
this.g.a.add(sVar);
sVar.b.add(this);
}
}
}
}
@Override // c.c.a.y.g
public void c(c.c.a.y.f fVar, int i, List<c.c.a.y.f> list, c.c.a.y.f fVar2) {
c.c.a.b0.f.f(fVar, i, list, fVar2, this);
}
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: c.c.a.c0.c<T> */
/* JADX WARN: Multi-variable type inference failed */
@Override // c.c.a.y.g
public <T> void g(T t, @Nullable c<T> cVar) {
if (t == o.g) {
a<?, PointF> aVar = this.d;
c<PointF> cVar2 = aVar.e;
aVar.e = cVar;
} else if (t == o.j) {
a<?, PointF> aVar2 = this.e;
c<PointF> cVar3 = aVar2.e;
aVar2.e = cVar;
}
}
@Override // c.c.a.w.b.c
public String getName() {
return this.b;
}
@Override // c.c.a.w.b.m
public Path getPath() {
if (this.h) {
return this.a;
}
this.a.reset();
if (this.f.e) {
this.h = true;
return this.a;
}
PointF e = this.d.e();
float f = e.x / 2.0f;
float f2 = e.y / 2.0f;
float f3 = f * 0.55228f;
float f4 = 0.55228f * f2;
this.a.reset();
if (this.f.d) {
float f5 = -f2;
this.a.moveTo(0.0f, f5);
float f6 = 0.0f - f3;
float f7 = -f;
float f8 = 0.0f - f4;
this.a.cubicTo(f6, f5, f7, f8, f7, 0.0f);
float f9 = f4 + 0.0f;
this.a.cubicTo(f7, f9, f6, f2, 0.0f, f2);
float f10 = f3 + 0.0f;
this.a.cubicTo(f10, f2, f, f9, f, 0.0f);
this.a.cubicTo(f, f8, f10, f5, 0.0f, f5);
} else {
float f11 = -f2;
this.a.moveTo(0.0f, f11);
float f12 = f3 + 0.0f;
float f13 = 0.0f - f4;
this.a.cubicTo(f12, f11, f, f13, f, 0.0f);
float f14 = f4 + 0.0f;
this.a.cubicTo(f, f14, f12, f2, 0.0f, f2);
float f15 = 0.0f - f3;
float f16 = -f;
this.a.cubicTo(f15, f2, f16, f14, f16, 0.0f);
this.a.cubicTo(f16, f13, f15, f11, 0.0f, f11);
}
PointF e2 = this.e.e();
this.a.offset(e2.x, e2.y);
this.a.close();
this.g.a(this.a);
this.h = true;
return this.a;
}
}