69 lines
2.2 KiB
Java
69 lines
2.2 KiB
Java
package c.c.a.a0;
|
|
|
|
import android.graphics.PointF;
|
|
import c.c.a.a0.h0.c;
|
|
import c.c.a.b0.f;
|
|
import c.c.a.y.a;
|
|
import c.c.a.y.l.k;
|
|
import java.io.IOException;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
/* compiled from: ShapeDataParser */
|
|
public class a0 implements g0<k> {
|
|
public static final a0 a = new a0();
|
|
public static final c.a b = c.a.a("c", "v", "i", "o");
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
@Override // c.c.a.a0.g0
|
|
public k a(c cVar, float f) throws IOException {
|
|
if (cVar.w() == c.b.BEGIN_ARRAY) {
|
|
cVar.a();
|
|
}
|
|
cVar.b();
|
|
List<PointF> list = null;
|
|
List<PointF> list2 = null;
|
|
List<PointF> list3 = null;
|
|
boolean z2 = false;
|
|
while (cVar.e()) {
|
|
int z3 = cVar.z(b);
|
|
if (z3 == 0) {
|
|
z2 = cVar.f();
|
|
} else if (z3 == 1) {
|
|
list = o.c(cVar, f);
|
|
} else if (z3 == 2) {
|
|
list2 = o.c(cVar, f);
|
|
} else if (z3 != 3) {
|
|
cVar.B();
|
|
cVar.C();
|
|
} else {
|
|
list3 = o.c(cVar, f);
|
|
}
|
|
}
|
|
cVar.d();
|
|
if (cVar.w() == c.b.END_ARRAY) {
|
|
cVar.c();
|
|
}
|
|
if (list == null || list2 == null || list3 == null) {
|
|
throw new IllegalArgumentException("Shape data was missing information.");
|
|
} else if (list.isEmpty()) {
|
|
return new k(new PointF(), false, Collections.emptyList());
|
|
} else {
|
|
int size = list.size();
|
|
PointF pointF = list.get(0);
|
|
ArrayList arrayList = new ArrayList(size);
|
|
for (int i = 1; i < size; i++) {
|
|
PointF pointF2 = list.get(i);
|
|
int i2 = i - 1;
|
|
arrayList.add(new a(f.a(list.get(i2), list3.get(i2)), f.a(pointF2, list2.get(i)), pointF2));
|
|
}
|
|
if (z2) {
|
|
PointF pointF3 = list.get(0);
|
|
int i3 = size - 1;
|
|
arrayList.add(new a(f.a(list.get(i3), list3.get(i3)), f.a(pointF3, list2.get(0)), pointF3));
|
|
}
|
|
return new k(pointF, z2, arrayList);
|
|
}
|
|
}
|
|
}
|