package X; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.DashPathEffect; import android.graphics.LinearGradient; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RadialGradient; import android.graphics.RectF; import android.graphics.Shader; import android.net.Uri; import android.os.Build; import android.util.Base64; import com.bytedance.covode.number.Covode; import com.lynx.tasm.base.LLog; import java.util.ArrayList; import java.util.Iterator; import java.util.Objects; import java.util.Stack; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; /* renamed from: X.PBo reason: case insensitive filesystem */ public final class C64019PBo { public float LIZ; public float LIZIZ; public Canvas LIZJ; public float LIZLLL; public KPR LJ; public C64021PBq LJFF; public C64008PBd LJI; public Stack<C64008PBd> LJII; public Stack<AbstractC64032PCb> LJIIIIZZ; public Stack<Matrix> LJIIIZ; static { Covode.recordClassIndex(39650); } public C64019PBo(Canvas canvas, float f, float f2, float f3, KPR kpr) { this.LIZJ = canvas; this.LIZ = f; this.LIZIZ = f2; this.LIZLLL = f3; this.LJ = kpr; } public static int LIZ(float f) { int i2 = (int) (f * 256.0f); if (i2 < 0) { return 0; } if (i2 > 255) { return 255; } return i2; } public static int LIZ(int i2, float f) { int i3 = 255; int round = Math.round(((float) ((i2 >> 24) & 255)) * f); if (round < 0) { i3 = 0; } else if (round <= 255) { i3 = round; } return (i2 & 16777215) | (i3 << 24); } private C64008PBd LIZ(C64039PCi pCi, C64008PBd pBd) { ArrayList<PCK> arrayList = new ArrayList(); while (true) { if (pCi instanceof PCK) { arrayList.add(0, pCi); } if (pCi.LJIILL == null) { break; } pCi = (C64039PCi) pCi.LJIILL; } for (PCK pck : arrayList) { LIZ(pBd, pck); } pBd.LJI = this.LJI.LJI; pBd.LJFF = this.LJI.LJFF; return pBd; } private C64028PBx LIZ(C64025PBu pBu, C64025PBu pBu2, C64025PBu pBu3, C64025PBu pBu4) { float f = 0.0f; float LIZ2 = pBu != null ? pBu.LIZ(this) : 0.0f; if (pBu2 != null) { f = pBu2.LIZIZ(this); } C64028PBx LIZ3 = LIZ(); return new C64028PBx(LIZ2, f, pBu3 != null ? pBu3.LIZ(this) : LIZ3.LIZJ, pBu4 != null ? pBu4.LIZIZ(this) : LIZ3.LIZLLL); } private Bitmap LIZ(String str) { if (!str.startsWith("data:")) { return null; } if (str.length() < 14) { return null; } int indexOf = str.indexOf(44); if (indexOf < 12) { return null; } if (!";base64".equals(str.substring(indexOf - 7, indexOf))) { return null; } try { byte[] decode = Base64.decode(str.substring(indexOf + 1), 0); return BitmapFactory.decodeByteArray(decode, 0, decode.length); } catch (Exception unused) { return null; } } /* JADX WARNING: Code restructure failed: missing block: B:25:0x006c, code lost: if (r6 != 8) goto L_0x006e; */ /* JADX WARNING: Removed duplicated region for block: B:16:0x005e */ private Matrix LIZ(C64028PBx pBx, C64028PBx pBx2, C64030PBz pBz) { float f; int i2; float f2; Matrix matrix = new Matrix(); if (!(pBz == null || pBz.LIZ == null)) { float f3 = pBx.LIZJ / pBx2.LIZJ; float f4 = pBx.LIZLLL / pBx2.LIZLLL; float f5 = -pBx2.LIZ; float f6 = -pBx2.LIZIZ; if (!pBz.equals(C64030PBz.LIZLLL)) { float max = pBz.LIZIZ == PCB.slice ? Math.max(f3, f4) : Math.min(f3, f4); float f7 = pBx.LIZJ / max; float f8 = pBx.LIZLLL / max; switch (PC0.LIZ[pBz.LIZ.ordinal()]) { case 1: case 2: case 3: f = (pBx2.LIZJ - f7) / 2.0f; f5 -= f; i2 = PC0.LIZ[pBz.LIZ.ordinal()]; if (i2 != 2) { if (i2 != 3) { if (i2 != 5) { if (i2 != 6) { if (i2 != 7) { break; } } } } f2 = pBx2.LIZLLL - f8; f6 -= f2; matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(max, max); matrix.preTranslate(f5, f6); break; } f2 = (pBx2.LIZLLL - f8) / 2.0f; f6 -= f2; matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(max, max); matrix.preTranslate(f5, f6); case 4: case 5: case 6: f = pBx2.LIZJ - f7; f5 -= f; i2 = PC0.LIZ[pBz.LIZ.ordinal()]; if (i2 != 2) { } f2 = (pBx2.LIZLLL - f8) / 2.0f; f6 -= f2; matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(max, max); matrix.preTranslate(f5, f6); break; default: i2 = PC0.LIZ[pBz.LIZ.ordinal()]; if (i2 != 2) { } f2 = (pBx2.LIZLLL - f8) / 2.0f; f6 -= f2; matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(max, max); matrix.preTranslate(f5, f6); break; } } else { matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(f3, f4); matrix.preTranslate(f5, f6); return matrix; } } return matrix; } private Path LIZ(PCO pco) { float LIZ2; float LIZIZ2; if (pco.LJFF == null && pco.LJI == null) { LIZ2 = 0.0f; LIZIZ2 = 0.0f; } else { if (pco.LJFF == null) { LIZ2 = pco.LJI.LIZIZ(this); } else if (pco.LJI == null) { LIZ2 = pco.LJFF.LIZ(this); } else { LIZ2 = pco.LJFF.LIZ(this); LIZIZ2 = pco.LJI.LIZIZ(this); } LIZIZ2 = LIZ2; } float min = Math.min(LIZ2, pco.LIZJ.LIZ(this) / 2.0f); float min2 = Math.min(LIZIZ2, pco.LIZLLL.LIZIZ(this) / 2.0f); float LIZ3 = pco.LIZ != null ? pco.LIZ.LIZ(this) : 0.0f; float LIZIZ3 = pco.LIZIZ != null ? pco.LIZIZ.LIZIZ(this) : 0.0f; float LIZ4 = pco.LIZJ.LIZ(this); float LIZIZ4 = pco.LIZLLL.LIZIZ(this); if (pco.LJIIIZ == null) { pco.LJIIIZ = new C64028PBx(LIZ3, LIZIZ3, LIZ4, LIZIZ4); } float f = LIZ3 + LIZ4; float f2 = LIZIZ3 + LIZIZ4; Path path = new Path(); if (min == 0.0f || min2 == 0.0f) { path.addRect(LIZ3, LIZIZ3, f, f2, Path.Direction.CW); return path; } float f3 = min * 0.5522848f; float f4 = 0.5522848f * min2; float f5 = LIZIZ3 + min2; path.moveTo(LIZ3, f5); float f6 = f5 - f4; float f7 = LIZ3 + min; float f8 = f7 - f3; path.cubicTo(LIZ3, f6, f8, LIZIZ3, f7, LIZIZ3); float f9 = f - min; path.lineTo(f9, LIZIZ3); float f10 = f9 + f3; path.cubicTo(f10, LIZIZ3, f, f6, f, f5); float f11 = f2 - min2; path.lineTo(f, f11); float f12 = f11 + f4; path.cubicTo(f, f12, f10, f2, f9, f2); path.lineTo(f7, f2); path.cubicTo(f8, f2, LIZ3, f12, LIZ3, f11); path.lineTo(LIZ3, f5); path.close(); return path; } private Path LIZ(PCR pcr) { float f = 0.0f; float LIZ2 = pcr.LIZ != null ? pcr.LIZ.LIZ(this) : 0.0f; if (pcr.LIZIZ != null) { f = pcr.LIZIZ.LIZIZ(this); } float LIZ3 = pcr.LIZJ.LIZ(this); float LIZIZ2 = pcr.LIZLLL.LIZIZ(this); float f2 = LIZ2 - LIZ3; float f3 = f - LIZIZ2; float f4 = LIZ2 + LIZ3; float f5 = f + LIZIZ2; if (pcr.LJIIIZ == null) { pcr.LJIIIZ = new C64028PBx(f2, f3, LIZ3 * 2.0f, 2.0f * LIZIZ2); } float f6 = LIZ3 * 0.5522848f; float f7 = 0.5522848f * LIZIZ2; Path path = new Path(); path.moveTo(LIZ2, f3); float f8 = LIZ2 + f6; float f9 = f - f7; path.cubicTo(f8, f3, f4, f9, f4, f); float f10 = f7 + f; path.cubicTo(f4, f10, f8, f5, LIZ2, f5); float f11 = LIZ2 - f6; path.cubicTo(f11, f5, f2, f10, f2, f); path.cubicTo(f2, f9, f11, f3, LIZ2, f3); path.close(); return path; } private Path LIZ(PCV pcv) { float f = 0.0f; float LIZ2 = pcv.LIZ != null ? pcv.LIZ.LIZ(this) : 0.0f; if (pcv.LIZIZ != null) { f = pcv.LIZIZ.LIZIZ(this); } float LIZJ2 = pcv.LIZJ.LIZJ(this); float f2 = LIZ2 - LIZJ2; float f3 = f - LIZJ2; float f4 = LIZ2 + LIZJ2; float f5 = f + LIZJ2; if (pcv.LJIIIZ == null) { float f6 = 2.0f * LIZJ2; pcv.LJIIIZ = new C64028PBx(f2, f3, f6, f6); } float f7 = 0.5522848f * LIZJ2; Path path = new Path(); path.moveTo(f4, f); float f8 = f + f7; float f9 = LIZ2 + f7; path.cubicTo(f4, f8, f9, f5, LIZ2, f5); float f10 = LIZ2 - f7; path.cubicTo(f10, f5, f2, f8, f2, f); float f11 = f - f7; path.cubicTo(f2, f11, f10, f3, LIZ2, f3); path.cubicTo(f9, f3, f4, f11, f4, f); path.close(); return path; } private Path LIZ(C64031PCa pCa) { Path path = new Path(); path.moveTo(pCa.LIZ[0], pCa.LIZ[1]); for (int i2 = 2; i2 < pCa.LIZ.length; i2 += 2) { path.lineTo(pCa.LIZ[i2], pCa.LIZ[i2 + 1]); } if (pCa instanceof C64040PCj) { path.close(); } if (pCa.LJIIIZ == null) { pCa.LJIIIZ = LIZIZ(path); } return path; } private Path LIZ(AbstractC64035PCe pCe, boolean z) { Path path; Path LIZIZ2; this.LJII.push(this.LJI); C64008PBd pBd = new C64008PBd(this, this.LJI); this.LJI = pBd; LIZ(pBd, pCe); if (!LJII() || !LJIIIIZZ()) { this.LJI = this.LJII.pop(); return null; } if (pCe instanceof PCM) { if (!z) { LIZIZ("<use> elements inside a <clipPath> cannot reference another <use>", new Object[0]); } PCM pcm = (PCM) pCe; C64039PCi LIZIZ3 = pCe.LJIILJJIL.LIZIZ(pcm.LIZ); if (LIZIZ3 == null) { LIZIZ("Use reference '%s' not found", pcm.LIZ); this.LJI = this.LJII.pop(); return null; } else if (!(LIZIZ3 instanceof AbstractC64035PCe)) { this.LJI = this.LJII.pop(); return null; } else { path = LIZ((AbstractC64035PCe) LIZIZ3, false); if (path == null) { return null; } if (pcm.LJIIIZ == null) { pcm.LJIIIZ = LIZIZ(path); } if (pcm.LIZIZ != null) { path.transform(pcm.LIZIZ); } } } else if (pCe instanceof PCZ) { PCZ pcz = (PCZ) pCe; if (pCe instanceof PCQ) { path = new C62548Oh7(((PCQ) pCe).LIZ).LIZ; if (pCe.LJIIIZ == null) { pCe.LJIIIZ = LIZIZ(path); } } else if (pCe instanceof PCO) { path = LIZ((PCO) pCe); } else if (pCe instanceof PCV) { path = LIZ((PCV) pCe); } else if (pCe instanceof PCR) { path = LIZ((PCR) pCe); } else { if (pCe instanceof C64031PCa) { path = LIZ((C64031PCa) pCe); } return null; } if (path != null) { if (pcz.LJIIIZ == null) { pcz.LJIIIZ = LIZIZ(path); } if (pcz.LJ != null) { path.transform(pcz.LJ); } path.setFillType(LJIILIIL()); } return null; } else { LIZIZ("Invalid %s element found in clipPath definition", pCe.LIZ()); return null; } if (!(this.LJI.LIZ.LJIJJ == null || (LIZIZ2 = LIZIZ(pCe, pCe.LJIIIZ)) == null)) { path.op(LIZIZ2, Path.Op.INTERSECT); } this.LJI = this.LJII.pop(); return path; } private void LIZ(float f, float f2, float f3, float f4) { float f5 = f3 + f; float f6 = f4 + f2; if (this.LJI.LIZ.LJIILL != null) { f += this.LJI.LIZ.LJIILL.LIZLLL.LIZ(this); f2 += this.LJI.LIZ.LJIILL.LIZ.LIZIZ(this); f5 -= this.LJI.LIZ.LJIILL.LIZIZ.LIZ(this); f6 -= this.LJI.LIZ.LJIILL.LIZJ.LIZIZ(this); } this.LIZJ.clipRect(f, f2, f5, f6); } private void LIZ(C64008PBd pBd, C64022PBr pBr) { if (LIZ(pBr, 4096)) { pBd.LIZ.LJIILIIL = pBr.LJIILIIL; } if (LIZ(pBr, 2048)) { pBd.LIZ.LJIIL = pBr.LJIIL; } if (LIZ(pBr, 1)) { pBd.LIZ.LIZIZ = pBr.LIZIZ; pBd.LIZIZ = (pBr.LIZIZ == null || pBr.LIZIZ == PCC.LIZJ) ? false : true; } if (LIZ(pBr, 4)) { pBd.LIZ.LIZLLL = pBr.LIZLLL; } if (LIZ(pBr, 6149)) { LIZ(pBd, true, pBd.LIZ.LIZIZ); } if (LIZ(pBr, 2)) { pBd.LIZ.LIZJ = pBr.LIZJ; } if (LIZ(pBr, 8)) { pBd.LIZ.LJ = pBr.LJ; pBd.LIZJ = (pBr.LJ == null || pBr.LJ == PCC.LIZJ) ? false : true; } if (LIZ(pBr, 16)) { pBd.LIZ.LJFF = pBr.LJFF; } if (LIZ(pBr, 6168)) { LIZ(pBd, false, pBd.LIZ.LJ); } if (LIZ(pBr, 34359738368L)) { pBd.LIZ.LJJII = pBr.LJJII; } if (LIZ(pBr, 32)) { pBd.LIZ.LJI = pBr.LJI; pBd.LJ.setStrokeWidth(pBd.LIZ.LJI.LIZJ(this)); } if (LIZ(pBr, 64)) { pBd.LIZ.LJII = pBr.LJII; int i2 = PC0.LIZIZ[pBr.LJII.ordinal()]; if (i2 == 1) { pBd.LJ.setStrokeCap(Paint.Cap.BUTT); } else if (i2 == 2) { pBd.LJ.setStrokeCap(Paint.Cap.ROUND); } else if (i2 == 3) { pBd.LJ.setStrokeCap(Paint.Cap.SQUARE); } } if (LIZ(pBr, 128)) { pBd.LIZ.LJIIIIZZ = pBr.LJIIIIZZ; int i3 = PC0.LIZJ[pBr.LJIIIIZZ.ordinal()]; if (i3 == 1) { pBd.LJ.setStrokeJoin(Paint.Join.MITER); } else if (i3 == 2) { pBd.LJ.setStrokeJoin(Paint.Join.ROUND); } else if (i3 == 3) { pBd.LJ.setStrokeJoin(Paint.Join.BEVEL); } } if (LIZ(pBr, 256)) { pBd.LIZ.LJIIIZ = pBr.LJIIIZ; pBd.LJ.setStrokeMiter(pBr.LJIIIZ.floatValue()); } if (LIZ(pBr, 512)) { pBd.LIZ.LJIIJ = pBr.LJIIJ; } if (LIZ(pBr, 1024)) { pBd.LIZ.LJIIJJI = pBr.LJIIJJI; } if (LIZ(pBr, 1536)) { if (pBd.LIZ.LJIIJ == null) { pBd.LJ.setPathEffect(null); } else { int length = pBd.LIZ.LJIIJ.length; int i4 = length % 2 == 0 ? length : length * 2; float[] fArr = new float[i4]; float f = 0.0f; for (int i5 = 0; i5 < i4; i5++) { fArr[i5] = pBd.LIZ.LJIIJ[i5 % length].LIZJ(this); f += fArr[i5]; } if (f == 0.0f) { pBd.LJ.setPathEffect(null); } else { float LIZJ2 = pBd.LIZ.LJIIJJI.LIZJ(this); if (LIZJ2 < 0.0f) { LIZJ2 = (LIZJ2 % f) + f; } pBd.LJ.setPathEffect(new DashPathEffect(fArr, LIZJ2)); } } } if (LIZ(pBr, 524288)) { pBd.LIZ.LJIILJJIL = pBr.LJIILJJIL; } if (LIZ(pBr, 16777216)) { pBd.LIZ.LJIILLIIL = pBr.LJIILLIIL; } if (LIZ(pBr, 33554432)) { pBd.LIZ.LJIIZILJ = pBr.LJIIZILJ; } if (LIZ(pBr, 1048576)) { pBd.LIZ.LJIILL = pBr.LJIILL; } if (LIZ(pBr, 268435456)) { pBd.LIZ.LJIJJ = pBr.LJIJJ; } if (LIZ(pBr, 536870912)) { pBd.LIZ.LJIJJLI = pBr.LJIJJLI; } if (LIZ(pBr, 67108864)) { pBd.LIZ.LJIJ = pBr.LJIJ; } if (LIZ(pBr, 134217728)) { pBd.LIZ.LJIJI = pBr.LJIJI; } if (LIZ(pBr, 8589934592L)) { pBd.LIZ.LJJI = pBr.LJJI; } if (LIZ(pBr, 17179869184L)) { pBd.LIZ.LJJIFFI = pBr.LJJIFFI; } if (LIZ(pBr, 137438953472L)) { pBd.LIZ.LJJIII = pBr.LJJIII; } } private void LIZ(C64008PBd pBd, PCK pck) { pBd.LIZ.LIZ(pck.LJIILL == null); if (pck.LJIIL != null) { LIZ(pBd, pck.LJIIL); } if (pck.LJIILIIL != null) { LIZ(pBd, pck.LJIILIIL); } } private void LIZ(C64008PBd pBd, boolean z, AbstractC64044PCn pCn) { int i2; C64022PBr pBr = pBd.LIZ; float floatValue = (z ? pBr.LIZLLL : pBr.LJFF).floatValue(); if (pCn instanceof PCC) { i2 = ((PCC) pCn).LIZ; } else if (pCn instanceof C64042PCl) { i2 = pBd.LIZ.LJIILIIL.LIZ; } else { return; } int LIZ2 = LIZ(i2, floatValue); if (z) { pBd.LIZLLL.setColor(LIZ2); } else { pBd.LJ.setColor(LIZ2); } } private void LIZ(AbstractC64026PBv pBv, String str) { while (true) { C64039PCi LIZIZ2 = pBv.LJIILJJIL.LIZIZ(str); if (LIZIZ2 == null) { LIZ("Gradient reference '%s' not found", str); return; } else if (!(LIZIZ2 instanceof AbstractC64026PBv)) { LIZIZ("Gradient href attributes must point to other gradient elements", new Object[0]); return; } else if (LIZIZ2 == pBv) { LIZIZ("Circular reference in gradient href attribute '%s'", str); return; } else { AbstractC64026PBv pBv2 = (AbstractC64026PBv) LIZIZ2; if (pBv.LIZIZ == null) { pBv.LIZIZ = pBv2.LIZIZ; } if (pBv.LIZJ == null) { pBv.LIZJ = pBv2.LIZJ; } if (pBv.LIZLLL == null) { pBv.LIZLLL = pBv2.LIZLLL; } if (pBv.LIZ.isEmpty()) { pBv.LIZ = pBv2.LIZ; } try { if (pBv instanceof PCU) { LIZ((PCU) pBv, (PCU) LIZIZ2); } else { LIZ((PCL) pBv, (PCL) LIZIZ2); } } catch (ClassCastException unused) { } if (pBv2.LJ != null) { str = pBv2.LJ; } else { return; } } } } private void LIZ(PC6 pc6, String str) { while (true) { C64039PCi LIZIZ2 = pc6.LJIILJJIL.LIZIZ(str); if (LIZIZ2 == null) { LIZ("Pattern reference '%s' not found", str); return; } else if (!(LIZIZ2 instanceof PC6)) { LIZIZ("Pattern href attributes must point to other pattern elements", new Object[0]); return; } else if (LIZIZ2 == pc6) { LIZIZ("Circular reference in pattern href attribute '%s'", str); return; } else { PC6 pc62 = (PC6) LIZIZ2; if (pc6.LIZ == null) { pc6.LIZ = pc62.LIZ; } if (pc6.LIZIZ == null) { pc6.LIZIZ = pc62.LIZIZ; } if (pc6.LIZJ == null) { pc6.LIZJ = pc62.LIZJ; } if (pc6.LIZLLL == null) { pc6.LIZLLL = pc62.LIZLLL; } if (pc6.LJ == null) { pc6.LJ = pc62.LJ; } if (pc6.LJFF == null) { pc6.LJFF = pc62.LJFF; } if (pc6.LJI == null) { pc6.LJI = pc62.LJI; } if (pc6.LJIIIIZZ.isEmpty()) { pc6.LJIIIIZZ = pc62.LJIIIIZZ; } if (pc6.LJIIZILJ == null) { pc6.LJIIZILJ = pc62.LJIIZILJ; } if (pc6.LJIILLIIL == null) { pc6.LJIILLIIL = pc62.LJIILLIIL; } if (pc62.LJII != null) { str = pc62.LJII; } else { return; } } } } private void LIZ(PCL pcl, PCL pcl2) { if (pcl.LJFF == null) { pcl.LJFF = pcl2.LJFF; } if (pcl.LJI == null) { pcl.LJI = pcl2.LJI; } if (pcl.LJII == null) { pcl.LJII = pcl2.LJII; } if (pcl.LJIIIIZZ == null) { pcl.LJIIIIZZ = pcl2.LJIIIIZZ; } if (pcl.LJIIIZ == null) { pcl.LJIIIZ = pcl2.LJIIIZ; } } private void LIZ(PCM pcm, Path path, Matrix matrix) { LIZ(this.LJI, pcm); if (LJII() && LJIIIIZZ()) { if (pcm.LIZIZ != null) { matrix.preConcat(pcm.LIZIZ); } C64039PCi LIZIZ2 = pcm.LJIILJJIL.LIZIZ(pcm.LIZ); if (LIZIZ2 == null) { LIZIZ("Use reference '%s' not found", pcm.LIZ); return; } LIZJ((AbstractC64035PCe) pcm); LIZ(LIZIZ2, false, path, matrix); } } private void LIZ(PCN pcn, C64028PBx pBx, C64028PBx pBx2, C64030PBz pBz) { LIZJ("Svg render", new Object[0]); if (pBx.LIZJ != 0.0f && pBx.LIZLLL != 0.0f) { if (pBz == null) { pBz = pcn.LJIILLIIL != null ? pcn.LJIILLIIL : new C64030PBz(PC1.none, PCB.meet); } LIZ(this.LJI, pcn); if (LJII()) { this.LJI.LJFF = pBx; if (!this.LJI.LIZ.LJIILJJIL.booleanValue()) { LIZ(this.LJI.LJFF.LIZ, this.LJI.LJFF.LIZIZ, this.LJI.LJFF.LIZJ, this.LJI.LJFF.LIZLLL); } LIZ(pcn, this.LJI.LJFF); if (pBx2 != null) { this.LIZJ.concat(LIZ(this.LJI.LJFF, pBx2, pBz)); this.LJI.LJI = pcn.LJIIZILJ; } else { this.LIZJ.translate(this.LJI.LJFF.LIZ, this.LJI.LJFF.LIZIZ); } boolean LJFF2 = LJFF(); LJIIJ(); LIZ((AbstractC64032PCb) pcn); if (LJFF2) { LIZLLL(); } LIZ((AbstractC64035PCe) pcn); } } } private void LIZ(PCQ pcq, Path path, Matrix matrix) { LIZ(this.LJI, pcq); if (LJII() && LJIIIIZZ()) { if (pcq.LJ != null) { matrix.preConcat(pcq.LJ); } Path path2 = new C62548Oh7(pcq.LIZ).LIZ; if (pcq.LJIIIZ == null) { pcq.LJIIIZ = LIZIZ(path2); } LIZJ((AbstractC64035PCe) pcq); path.setFillType(LJIILIIL()); path.addPath(path2, matrix); } } private void LIZ(PCU pcu, PCU pcu2) { if (pcu.LJFF == null) { pcu.LJFF = pcu2.LJFF; } if (pcu.LJI == null) { pcu.LJI = pcu2.LJI; } if (pcu.LJII == null) { pcu.LJII = pcu2.LJII; } if (pcu.LJIIIIZZ == null) { pcu.LJIIIIZZ = pcu2.LJIIIIZZ; } } private void LIZ(PCZ pcz, Path path, Matrix matrix) { Path LIZ2; LIZ(this.LJI, pcz); if (LJII() && LJIIIIZZ()) { if (pcz.LJ != null) { matrix.preConcat(pcz.LJ); } if (pcz instanceof PCO) { LIZ2 = LIZ((PCO) pcz); } else if (pcz instanceof PCV) { LIZ2 = LIZ((PCV) pcz); } else if (pcz instanceof PCR) { LIZ2 = LIZ((PCR) pcz); } else if (pcz instanceof C64031PCa) { LIZ2 = LIZ((C64031PCa) pcz); } else { return; } LIZJ((AbstractC64035PCe) pcz); path.setFillType(LJIILIIL()); path.addPath(LIZ2, matrix); } } private void LIZ(AbstractC64032PCb pCb) { LIZIZ(pCb); for (C64039PCi pCi : pCb.LIZIZ()) { LIZ(pCi); } LJ(); } private void LIZ(AbstractC64035PCe pCe) { if (pCe.LJIILL != null && pCe.LJIIIZ != null) { Matrix matrix = new Matrix(); if (this.LJIIIZ.peek().invert(matrix)) { int i2 = 2; float[] fArr = {pCe.LJIIIZ.LIZ, pCe.LJIIIZ.LIZIZ, pCe.LJIIIZ.LIZ(), pCe.LJIIIZ.LIZIZ, pCe.LJIIIZ.LIZ(), pCe.LJIIIZ.LIZIZ(), pCe.LJIIIZ.LIZ, pCe.LJIIIZ.LIZIZ()}; matrix.preConcat(this.LIZJ.getMatrix()); matrix.mapPoints(fArr); RectF rectF = new RectF(fArr[0], fArr[1], fArr[0], fArr[1]); do { if (fArr[i2] < rectF.left) { rectF.left = fArr[i2]; } if (fArr[i2] > rectF.right) { rectF.right = fArr[i2]; } int i3 = i2 + 1; if (fArr[i3] < rectF.top) { rectF.top = fArr[i3]; } if (fArr[i3] > rectF.bottom) { rectF.bottom = fArr[i3]; } i2 += 2; } while (i2 <= 6); AbstractC64035PCe pCe2 = (AbstractC64035PCe) this.LJIIIIZZ.peek(); if (pCe2.LJIIIZ == null) { pCe2.LJIIIZ = C64028PBx.LIZ(rectF.left, rectF.top, rectF.right, rectF.bottom); } else { pCe2.LJIIIZ.LIZ(C64028PBx.LIZ(rectF.left, rectF.top, rectF.right, rectF.bottom)); } } } } private void LIZ(AbstractC64035PCe pCe, C64028PBx pBx) { if (this.LJI.LIZ.LJIJJ != null) { int i2 = Build.VERSION.SDK_INT; Path LIZIZ2 = LIZIZ(pCe, pBx); if (LIZIZ2 != null) { this.LIZJ.clipPath(LIZIZ2); } } } private void LIZ(AbstractC64035PCe pCe, Path path) { if (this.LJI.LIZ.LIZIZ instanceof PCD) { C64039PCi LIZIZ2 = this.LJFF.LIZIZ(((PCD) this.LJI.LIZ.LIZIZ).LIZ); if (LIZIZ2 instanceof PC6) { LIZ(pCe, path, (PC6) LIZIZ2); return; } } this.LIZJ.drawPath(path, this.LJI.LIZLLL); } private void LIZ(AbstractC64035PCe pCe, Path path, PC6 pc6) { float f; float f2; float f3; float f4; boolean z = pc6.LIZ != null && pc6.LIZ.booleanValue(); if (pc6.LJII != null) { LIZ(pc6, pc6.LJII); } if (z) { f = pc6.LIZLLL != null ? pc6.LIZLLL.LIZ(this) : 0.0f; f2 = pc6.LJ != null ? pc6.LJ.LIZIZ(this) : 0.0f; f3 = pc6.LJFF != null ? pc6.LJFF.LIZ(this) : 0.0f; f4 = pc6.LJI != null ? pc6.LJI.LIZIZ(this) : 0.0f; } else { float LIZLLL2 = pc6.LIZLLL != null ? pc6.LIZLLL.LIZLLL(this) : 0.0f; float LIZLLL3 = pc6.LJ != null ? pc6.LJ.LIZLLL(this) : 0.0f; float LIZLLL4 = pc6.LJFF != null ? pc6.LJFF.LIZLLL(this) : 0.0f; float LIZLLL5 = pc6.LJI != null ? pc6.LJI.LIZLLL(this) : 0.0f; f = (LIZLLL2 * pCe.LJIIIZ.LIZJ) + pCe.LJIIIZ.LIZ; f2 = (LIZLLL3 * pCe.LJIIIZ.LIZLLL) + pCe.LJIIIZ.LIZIZ; f3 = LIZLLL4 * pCe.LJIIIZ.LIZJ; f4 = LIZLLL5 * pCe.LJIIIZ.LIZLLL; } if (!(f3 == 0.0f || f4 == 0.0f)) { C64030PBz pBz = pc6.LJIILLIIL != null ? pc6.LJIILLIIL : C64030PBz.LJ; LIZJ(); this.LIZJ.clipPath(path); C64008PBd pBd = new C64008PBd(this); LIZ(pBd, C64022PBr.LIZ()); pBd.LIZ.LJIILJJIL = false; this.LJI = LIZ(pc6, pBd); C64028PBx pBx = pCe.LJIIIZ; if (pc6.LIZJ != null) { this.LIZJ.concat(pc6.LIZJ); Matrix matrix = new Matrix(); if (pc6.LIZJ.invert(matrix)) { float[] fArr = {pCe.LJIIIZ.LIZ, pCe.LJIIIZ.LIZIZ, pCe.LJIIIZ.LIZ(), pCe.LJIIIZ.LIZIZ, pCe.LJIIIZ.LIZ(), pCe.LJIIIZ.LIZIZ(), pCe.LJIIIZ.LIZ, pCe.LJIIIZ.LIZIZ()}; matrix.mapPoints(fArr); RectF rectF = new RectF(fArr[0], fArr[1], fArr[0], fArr[1]); int i2 = 2; do { if (fArr[i2] < rectF.left) { rectF.left = fArr[i2]; } if (fArr[i2] > rectF.right) { rectF.right = fArr[i2]; } int i3 = i2 + 1; if (fArr[i3] < rectF.top) { rectF.top = fArr[i3]; } if (fArr[i3] > rectF.bottom) { rectF.bottom = fArr[i3]; } i2 += 2; } while (i2 <= 6); pBx = new C64028PBx(rectF.left, rectF.top, rectF.right - rectF.left, rectF.bottom - rectF.top); } } float floor = f + (((float) Math.floor((double) ((pBx.LIZ - f) / f3))) * f3); float LIZ2 = pBx.LIZ(); float LIZIZ2 = pBx.LIZIZ(); C64028PBx pBx2 = new C64028PBx(0.0f, 0.0f, f3, f4); boolean LJFF2 = LJFF(); for (float floor2 = f2 + (((float) Math.floor((double) ((pBx.LIZIZ - f2) / f4))) * f4); floor2 < LIZIZ2; floor2 += f4) { for (float f5 = floor; f5 < LIZ2; f5 += f3) { pBx2.LIZ = f5; pBx2.LIZIZ = floor2; LIZJ(); if (!this.LJI.LIZ.LJIILJJIL.booleanValue()) { LIZ(pBx2.LIZ, pBx2.LIZIZ, pBx2.LIZJ, pBx2.LIZLLL); } if (pc6.LJIIZILJ != null) { this.LIZJ.concat(LIZ(pBx2, pc6.LJIIZILJ, pBz)); } else { boolean z2 = pc6.LIZIZ == null || pc6.LIZIZ.booleanValue(); this.LIZJ.translate(f5, floor2); if (!z2) { this.LIZJ.scale(pCe.LJIIIZ.LIZJ, pCe.LJIIIZ.LIZLLL); } } for (C64039PCi pCi : pc6.LJIIIIZZ) { LIZ(pCi); } LIZLLL(); } } if (LJFF2) { LIZLLL(); } LIZLLL(); } } private void LIZ(C64039PCi pCi) { if (!(pCi instanceof AbstractC64047PCq)) { LIZJ(); LIZIZ(pCi); if (pCi instanceof PCN) { PCN pcn = (PCN) pCi; LIZ(pcn, LIZ(pcn.LIZ, pcn.LIZIZ, pcn.LIZJ, pcn.LIZLLL), pcn.LJIIZILJ, pcn.LJIILLIIL); } else { float f = 0.0f; if (pCi instanceof PCM) { PCM pcm = (PCM) pCi; LIZJ("Use render", new Object[0]); if ((pcm.LJ == null || !pcm.LJ.LIZ()) && (pcm.LJFF == null || !pcm.LJFF.LIZ())) { LIZ(this.LJI, pcm); if (LJII()) { C64039PCi LIZIZ2 = pcm.LJIILJJIL.LIZIZ(pcm.LIZ); if (LIZIZ2 == null) { LIZIZ("Use reference '%s' not found", pcm.LIZ); } else { if (pcm.LIZIZ != null) { this.LIZJ.concat(pcm.LIZIZ); } float LIZ2 = pcm.LIZJ != null ? pcm.LIZJ.LIZ(this) : 0.0f; if (pcm.LIZLLL != null) { f = pcm.LIZLLL.LIZIZ(this); } this.LIZJ.translate(LIZ2, f); LIZJ((AbstractC64035PCe) pcm); boolean LJFF2 = LJFF(); LIZIZ((AbstractC64032PCb) pcm); if (LIZIZ2 instanceof PCN) { PCN pcn2 = (PCN) LIZIZ2; C64028PBx LIZ3 = LIZ((C64025PBu) null, (C64025PBu) null, pcm.LJ, pcm.LJFF); LIZJ(); LIZ(pcn2, LIZ3, pcn2.LJIIZILJ, pcn2.LJIILLIIL); LIZLLL(); } else { LIZ(LIZIZ2); } LJ(); if (LJFF2) { LIZLLL(); } LIZ((AbstractC64035PCe) pcm); } } } } else if (pCi instanceof PCX) { PCX pcx = (PCX) pCi; LIZJ(pcx.LIZ() + " render", new Object[0]); LIZ(this.LJI, pcx); if (LJII()) { if (pcx.LIZIZ != null) { this.LIZJ.concat(pcx.LIZIZ); } LIZJ((AbstractC64035PCe) pcx); boolean LJFF3 = LJFF(); LIZ((AbstractC64032PCb) pcx); if (LJFF3) { LIZLLL(); } LIZ((AbstractC64035PCe) pcx); } } else if (pCi instanceof PC9) { PC9 pc9 = (PC9) pCi; LIZJ("Image render", new Object[0]); if (!(pc9.LIZLLL == null || pc9.LIZLLL.LIZ() || pc9.LJ == null || pc9.LJ.LIZ() || pc9.LIZ == null)) { C64030PBz pBz = pc9.LJIILLIIL != null ? pc9.LJIILLIIL : C64030PBz.LJ; Bitmap LIZ4 = LIZ(pc9.LIZ); if (LIZ4 == null) { KPR kpr = this.LJ; String str = pc9.LIZ; C64034PCd pCd = new C64034PCd(this, pc9, pBz); MXW<O2A<O29>> LIZIZ3 = C61237O2o.LIZ().LJ().LIZIZ(O68.LIZ(O13.LIZ(Uri.parse(JU4.LIZ(kpr.LIZ, str)))).LIZ(), "lynx_SvgResourceManager"); CountDownLatch countDownLatch = new CountDownLatch(1); LIZIZ3.LIZ(new N56(kpr, LIZIZ3, pCd, countDownLatch), C186707Vj.LIZ); try { countDownLatch.await(3, TimeUnit.SECONDS); } catch (InterruptedException unused) { } } else { LIZ(pc9, pBz, LIZ4); } } } else if (pCi instanceof PCQ) { PCQ pcq = (PCQ) pCi; LIZJ("Path render", new Object[0]); if (pcq.LIZ != null) { LIZ(this.LJI, pcq); if (LJII() && LJIIIIZZ() && (this.LJI.LIZJ || this.LJI.LIZIZ)) { if (pcq.LJ != null) { this.LIZJ.concat(pcq.LJ); } Path path = new C62548Oh7(pcq.LIZ).LIZ; if (pcq.LJIIIZ == null) { pcq.LJIIIZ = LIZIZ(path); } LIZ((AbstractC64035PCe) pcq); LIZIZ((AbstractC64035PCe) pcq); LIZJ((AbstractC64035PCe) pcq); boolean LJFF4 = LJFF(); if (this.LJI.LIZIZ) { path.setFillType(LJIIIZ()); LIZ(pcq, path); } if (this.LJI.LIZJ) { LIZ(path); } if (LJFF4) { LIZLLL(); } } } } else if (pCi instanceof PCO) { PCO pco = (PCO) pCi; LIZJ("Rect render", new Object[0]); if (pco.LIZJ != null && pco.LIZLLL != null && !pco.LIZJ.LIZ() && !pco.LIZLLL.LIZ()) { LIZ(this.LJI, pco); if (LJII() && LJIIIIZZ()) { if (pco.LJ != null) { this.LIZJ.concat(pco.LJ); } Path LIZ5 = LIZ(pco); LIZ((AbstractC64035PCe) pco); LIZIZ((AbstractC64035PCe) pco); LIZJ((AbstractC64035PCe) pco); boolean LJFF5 = LJFF(); if (this.LJI.LIZIZ) { LIZ(pco, LIZ5); } if (this.LJI.LIZJ) { LIZ(LIZ5); } if (LJFF5) { LIZLLL(); } } } } else if (pCi instanceof PCV) { PCV pcv = (PCV) pCi; LIZJ("Circle render", new Object[0]); if (pcv.LIZJ != null && !pcv.LIZJ.LIZ()) { LIZ(this.LJI, pcv); if (LJII() && LJIIIIZZ()) { if (pcv.LJ != null) { this.LIZJ.concat(pcv.LJ); } Path LIZ6 = LIZ(pcv); LIZ((AbstractC64035PCe) pcv); LIZIZ((AbstractC64035PCe) pcv); LIZJ((AbstractC64035PCe) pcv); boolean LJFF6 = LJFF(); if (this.LJI.LIZIZ) { LIZ(pcv, LIZ6); } if (this.LJI.LIZJ) { LIZ(LIZ6); } if (LJFF6) { LIZLLL(); } } } } else if (pCi instanceof PCR) { PCR pcr = (PCR) pCi; LIZJ("Ellipse render", new Object[0]); if (pcr.LIZJ != null && pcr.LIZLLL != null && !pcr.LIZJ.LIZ() && !pcr.LIZLLL.LIZ()) { LIZ(this.LJI, pcr); if (LJII() && LJIIIIZZ()) { if (pcr.LJ != null) { this.LIZJ.concat(pcr.LJ); } Path LIZ7 = LIZ(pcr); LIZ((AbstractC64035PCe) pcr); LIZIZ((AbstractC64035PCe) pcr); LIZJ((AbstractC64035PCe) pcr); boolean LJFF7 = LJFF(); if (this.LJI.LIZIZ) { LIZ(pcr, LIZ7); } if (this.LJI.LIZJ) { LIZ(LIZ7); } if (LJFF7) { LIZLLL(); } } } } else if (pCi instanceof PCS) { PCS pcs = (PCS) pCi; LIZJ("Line render", new Object[0]); LIZ(this.LJI, pcs); if (LJII() && LJIIIIZZ() && this.LJI.LIZJ) { if (pcs.LJ != null) { this.LIZJ.concat(pcs.LJ); } float LIZ8 = pcs.LIZ == null ? 0.0f : pcs.LIZ.LIZ(this); float LIZIZ4 = pcs.LIZIZ == null ? 0.0f : pcs.LIZIZ.LIZIZ(this); float LIZ9 = pcs.LIZJ == null ? 0.0f : pcs.LIZJ.LIZ(this); if (pcs.LIZLLL != null) { f = pcs.LIZLLL.LIZIZ(this); } if (pcs.LJIIIZ == null) { pcs.LJIIIZ = new C64028PBx(Math.min(LIZ8, LIZ9), Math.min(LIZIZ4, f), Math.abs(LIZ9 - LIZ8), Math.abs(f - LIZIZ4)); } Path path2 = new Path(); path2.moveTo(LIZ8, LIZIZ4); path2.lineTo(LIZ9, f); LIZ((AbstractC64035PCe) pcs); LIZIZ((AbstractC64035PCe) pcs); LIZJ((AbstractC64035PCe) pcs); boolean LJFF8 = LJFF(); LIZ(path2); if (LJFF8) { LIZLLL(); } } } else if (pCi instanceof C64040PCj) { C64040PCj pCj = (C64040PCj) pCi; LIZJ("Polygon render", new Object[0]); LIZ(this.LJI, pCj); if (LJII() && LJIIIIZZ() && (this.LJI.LIZJ || this.LJI.LIZIZ)) { if (pCj.LJ != null) { this.LIZJ.concat(pCj.LJ); } if (pCj.LIZ.length >= 2) { Path LIZ10 = LIZ((C64031PCa) pCj); LIZ((AbstractC64035PCe) pCj); LIZIZ((AbstractC64035PCe) pCj); LIZJ((AbstractC64035PCe) pCj); boolean LJFF9 = LJFF(); if (this.LJI.LIZIZ) { LIZ(pCj, LIZ10); } if (this.LJI.LIZJ) { LIZ(LIZ10); } if (LJFF9) { LIZLLL(); } } } } else if (pCi instanceof C64031PCa) { C64031PCa pCa = (C64031PCa) pCi; LIZJ("PolyLine render", new Object[0]); LIZ(this.LJI, pCa); if (LJII() && LJIIIIZZ() && (this.LJI.LIZJ || this.LJI.LIZIZ)) { if (pCa.LJ != null) { this.LIZJ.concat(pCa.LJ); } if (pCa.LIZ.length >= 2) { Path LIZ11 = LIZ(pCa); LIZ((AbstractC64035PCe) pCa); LIZ11.setFillType(LJIIIZ()); LIZIZ((AbstractC64035PCe) pCa); LIZJ((AbstractC64035PCe) pCa); boolean LJFF10 = LJFF(); if (this.LJI.LIZIZ) { LIZ(pCa, LIZ11); } if (this.LJI.LIZJ) { LIZ(LIZ11); } if (LJFF10) { LIZLLL(); } } } } } LIZLLL(); } } private void LIZ(C64039PCi pCi, boolean z, Path path, Matrix matrix) { if (LJII()) { LJIIJJI(); if (pCi instanceof PCM) { if (z) { LIZ((PCM) pCi, path, matrix); } else { LIZIZ("<use> elements inside a <clipPath> cannot reference another <use>", new Object[0]); } } else if (pCi instanceof PCQ) { LIZ((PCQ) pCi, path, matrix); } else if (pCi instanceof PCZ) { LIZ((PCZ) pCi, path, matrix); } else { LIZIZ("Invalid %s element found in clipPath definition", pCi.toString()); } LJIIL(); } } private void LIZ(Path path) { if (this.LJI.LIZ.LJJII == PCE.NonScalingStroke) { Matrix matrix = this.LIZJ.getMatrix(); Path path2 = new Path(); path.transform(matrix, path2); this.LIZJ.setMatrix(new Matrix()); Shader shader = this.LJI.LJ.getShader(); Matrix matrix2 = new Matrix(); if (shader != null) { shader.getLocalMatrix(matrix2); Matrix matrix3 = new Matrix(matrix2); matrix3.postConcat(matrix); shader.setLocalMatrix(matrix3); } this.LIZJ.drawPath(path2, this.LJI.LJ); this.LIZJ.setMatrix(matrix); if (shader != null) { shader.setLocalMatrix(matrix2); return; } return; } this.LIZJ.drawPath(path, this.LJI.LJ); } public static void LIZ(String str, Object... objArr) { LLog.LIZ(5, "SVGAndroidRenderer", AnonymousClass0EJ.LIZ(str, objArr)); } private void LIZ(boolean z, C64028PBx pBx, PCD pcd) { C64039PCi LIZIZ2 = this.LJFF.LIZIZ(pcd.LIZ); if (LIZIZ2 == null) { Object[] objArr = new Object[2]; objArr[0] = z ? "Fill" : "Stroke"; objArr[1] = pcd.LIZ; LIZIZ("%s reference '%s' not found", objArr); if (pcd.LIZIZ != null) { LIZ(this.LJI, z, pcd.LIZIZ); } else if (z) { this.LJI.LIZIZ = false; } else { this.LJI.LIZJ = false; } } else if (LIZIZ2 instanceof PCU) { LIZ(z, pBx, (PCU) LIZIZ2); } else if (LIZIZ2 instanceof PCL) { LIZ(z, pBx, (PCL) LIZIZ2); } else if (LIZIZ2 instanceof PCH) { LIZ(z, (PCH) LIZIZ2); } } private void LIZ(boolean z, C64028PBx pBx, PCL pcl) { float f; float LIZLLL2; float LIZLLL3; if (pcl.LJ != null) { LIZ(pcl, pcl.LJ); } int i2 = 0; boolean z2 = pcl.LIZIZ != null && pcl.LIZIZ.booleanValue(); C64008PBd pBd = this.LJI; Paint paint = z ? pBd.LIZLLL : pBd.LJ; if (z2) { C64025PBu pBu = new C64025PBu(50.0f, EnumC64027PBw.percent); LIZLLL2 = pcl.LJFF != null ? pcl.LJFF.LIZ(this) : pBu.LIZ(this); LIZLLL3 = pcl.LJI != null ? pcl.LJI.LIZIZ(this) : pBu.LIZIZ(this); if (pcl.LJII != null) { pBu = pcl.LJII; } f = pBu.LIZJ(this); } else { f = 0.5f; LIZLLL2 = pcl.LJFF != null ? pcl.LJFF.LIZLLL(this) : 0.5f; LIZLLL3 = pcl.LJI != null ? pcl.LJI.LIZLLL(this) : 0.5f; if (pcl.LJII != null) { f = pcl.LJII.LIZLLL(this); } } LIZJ(); this.LJI = LIZJ(pcl); Matrix matrix = new Matrix(); if (!z2) { matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(pBx.LIZJ, pBx.LIZLLL); } if (pcl.LIZJ != null) { matrix.preConcat(pcl.LIZJ); } int size = pcl.LIZ.size(); if (size == 0) { LIZLLL(); if (z) { this.LJI.LIZIZ = false; } else { this.LJI.LIZJ = false; } } else { int[] iArr = new int[size]; float[] fArr = new float[size]; float f2 = -1.0f; Iterator it = pcl.LIZ.iterator(); while (true) { float f3 = 0.0f; if (!it.hasNext()) { break; } PC8 pc8 = (PC8) ((C64039PCi) it.next()); if (pc8.LIZ != null) { f3 = pc8.LIZ.floatValue(); } if (i2 == 0 || f3 >= f2) { fArr[i2] = f3; f2 = f3; } else { fArr[i2] = f2; } LIZJ(); LIZ(this.LJI, pc8); PCC pcc = (PCC) this.LJI.LIZ.LJIJ; if (pcc == null) { pcc = PCC.LIZIZ; } iArr[i2] = LIZ(pcc.LIZ, this.LJI.LIZ.LJIJI.floatValue()); i2++; LIZLLL(); } if (f == 0.0f || size == 1) { LIZLLL(); paint.setColor(iArr[size - 1]); return; } Shader.TileMode tileMode = Shader.TileMode.CLAMP; if (pcl.LIZLLL != null) { if (pcl.LIZLLL == PCA.reflect) { tileMode = Shader.TileMode.MIRROR; } else if (pcl.LIZLLL == PCA.repeat) { tileMode = Shader.TileMode.REPEAT; } } LIZLLL(); RadialGradient radialGradient = new RadialGradient(LIZLLL2, LIZLLL3, f, iArr, fArr, tileMode); radialGradient.setLocalMatrix(matrix); paint.setShader(radialGradient); paint.setAlpha(LIZ(this.LJI.LIZ.LIZLLL.floatValue())); } } private void LIZ(boolean z, C64028PBx pBx, PCU pcu) { float f; float f2; float f3; float f4; if (pcu.LJ != null) { LIZ(pcu, pcu.LJ); } int i2 = 0; boolean z2 = pcu.LIZIZ != null && pcu.LIZIZ.booleanValue(); C64008PBd pBd = this.LJI; Paint paint = z ? pBd.LIZLLL : pBd.LJ; if (z2) { C64028PBx LIZ2 = LIZ(); f2 = pcu.LJFF != null ? pcu.LJFF.LIZ(this) : 0.0f; f = pcu.LJI != null ? pcu.LJI.LIZIZ(this) : 0.0f; f3 = pcu.LJII != null ? pcu.LJII.LIZ(this) : LIZ2.LIZJ; if (pcu.LJIIIIZZ != null) { f4 = pcu.LJIIIIZZ.LIZIZ(this); } f4 = 0.0f; } else { f2 = pcu.LJFF != null ? pcu.LJFF.LIZLLL(this) : 0.0f; f = pcu.LJI != null ? pcu.LJI.LIZLLL(this) : 0.0f; f3 = pcu.LJII != null ? pcu.LJII.LIZLLL(this) : 1.0f; if (pcu.LJIIIIZZ != null) { f4 = pcu.LJIIIIZZ.LIZLLL(this); } f4 = 0.0f; } LIZJ(); this.LJI = LIZJ(pcu); Matrix matrix = new Matrix(); if (!z2) { matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(pBx.LIZJ, pBx.LIZLLL); } if (pcu.LIZJ != null) { matrix.preConcat(pcu.LIZJ); } int size = pcu.LIZ.size(); if (size == 0) { LIZLLL(); if (z) { this.LJI.LIZIZ = false; } else { this.LJI.LIZJ = false; } } else { int[] iArr = new int[size]; float[] fArr = new float[size]; float f5 = -1.0f; for (C64039PCi pCi : pcu.LIZ) { PC8 pc8 = (PC8) pCi; float floatValue = pc8.LIZ != null ? pc8.LIZ.floatValue() : 0.0f; if (i2 == 0 || floatValue >= f5) { fArr[i2] = floatValue; f5 = floatValue; } else { fArr[i2] = f5; } LIZJ(); LIZ(this.LJI, pc8); PCC pcc = (PCC) this.LJI.LIZ.LJIJ; if (pcc == null) { pcc = PCC.LIZIZ; } iArr[i2] = LIZ(pcc.LIZ, this.LJI.LIZ.LJIJI.floatValue()); i2++; LIZLLL(); } if ((f2 == f3 && f == f4) || size == 1) { LIZLLL(); paint.setColor(iArr[size - 1]); return; } Shader.TileMode tileMode = Shader.TileMode.CLAMP; if (pcu.LIZLLL != null) { if (pcu.LIZLLL == PCA.reflect) { tileMode = Shader.TileMode.MIRROR; } else if (pcu.LIZLLL == PCA.repeat) { tileMode = Shader.TileMode.REPEAT; } } LIZLLL(); LinearGradient linearGradient = new LinearGradient(f2, f, f3, f4, iArr, fArr, tileMode); linearGradient.setLocalMatrix(matrix); paint.setShader(linearGradient); paint.setAlpha(LIZ(this.LJI.LIZ.LIZLLL.floatValue())); } } private void LIZ(boolean z, PCH pch) { boolean z2 = true; if (z) { if (LIZ(pch.LJIIL, 2147483648L)) { this.LJI.LIZ.LIZIZ = pch.LJIIL.LJIL; C64008PBd pBd = this.LJI; if (pch.LJIIL.LJIL == null) { z2 = false; } pBd.LIZIZ = z2; } if (LIZ(pch.LJIIL, 4294967296L)) { this.LJI.LIZ.LIZLLL = pch.LJIIL.LJJ; } if (LIZ(pch.LJIIL, 6442450944L)) { C64008PBd pBd2 = this.LJI; LIZ(pBd2, z, pBd2.LIZ.LIZIZ); return; } return; } if (LIZ(pch.LJIIL, 2147483648L)) { this.LJI.LIZ.LJ = pch.LJIIL.LJIL; C64008PBd pBd3 = this.LJI; if (pch.LJIIL.LJIL == null) { z2 = false; } pBd3.LIZJ = z2; } if (LIZ(pch.LJIIL, 4294967296L)) { this.LJI.LIZ.LJFF = pch.LJIIL.LJJ; } if (LIZ(pch.LJIIL, 6442450944L)) { C64008PBd pBd4 = this.LJI; LIZ(pBd4, z, pBd4.LIZ.LJ); } } private boolean LIZ(C64022PBr pBr, long j) { return (j & pBr.LIZ) != 0; } private C64028PBx LIZIZ(Path path) { RectF rectF = new RectF(); path.computeBounds(rectF, true); return new C64028PBx(rectF.left, rectF.top, rectF.width(), rectF.height()); } private Path LIZIZ(AbstractC64035PCe pCe, C64028PBx pBx) { Path LIZ2; C64039PCi LIZIZ2 = pCe.LJIILJJIL.LIZIZ(this.LJI.LIZ.LJIJJ); boolean z = false; if (LIZIZ2 == null) { LIZIZ("ClipPath reference '%s' not found", this.LJI.LIZ.LJIJJ); return null; } PCY pcy = (PCY) LIZIZ2; this.LJII.push(this.LJI); this.LJI = LIZJ((C64039PCi) pcy); if (pcy.LIZ == null || pcy.LIZ.booleanValue()) { z = true; } Matrix matrix = new Matrix(); if (!z) { matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(pBx.LIZJ, pBx.LIZLLL); } if (pcy.LIZIZ != null) { matrix.preConcat(pcy.LIZIZ); } Path path = new Path(); for (C64039PCi pCi : pcy.LJIIIIZZ) { if ((pCi instanceof AbstractC64035PCe) && (LIZ2 = LIZ((AbstractC64035PCe) pCi, true)) != null) { path.op(LIZ2, Path.Op.UNION); } } if (this.LJI.LIZ.LJIJJ != null) { if (pcy.LJIIIZ == null) { pcy.LJIIIZ = LIZIZ(path); } Path LIZIZ3 = LIZIZ(pcy, pcy.LJIIIZ); if (LIZIZ3 != null) { path.op(LIZIZ3, Path.Op.INTERSECT); } } path.transform(matrix); this.LJI = this.LJII.pop(); return path; } private void LIZIZ() { this.LJI = new C64008PBd(this); this.LJII = new Stack<>(); LIZ(this.LJI, C64022PBr.LIZ()); this.LJI.LJFF = null; this.LJI.LJII = false; this.LJII.push(new C64008PBd(this, this.LJI)); this.LJIIIZ = new Stack<>(); this.LJIIIIZZ = new Stack<>(); } private void LIZIZ(AbstractC64032PCb pCb) { this.LJIIIIZZ.push(pCb); this.LJIIIZ.push(this.LIZJ.getMatrix()); } private void LIZIZ(AbstractC64035PCe pCe) { if (this.LJI.LIZ.LIZIZ instanceof PCD) { LIZ(true, pCe.LJIIIZ, (PCD) this.LJI.LIZ.LIZIZ); } if (this.LJI.LIZ.LJ instanceof PCD) { LIZ(false, pCe.LJIIIZ, (PCD) this.LJI.LIZ.LJ); } } private void LIZIZ(C64039PCi pCi) { if (pCi instanceof PCK) { PCK pck = (PCK) pCi; if (pck.LJIIJJI != null) { this.LJI.LJII = pck.LJIIJJI.booleanValue(); } } } public static void LIZIZ(String str, Object... objArr) { LLog.LIZ(6, "SVGAndroidRenderer", AnonymousClass0EJ.LIZ(str, objArr)); } private C64008PBd LIZJ(C64039PCi pCi) { C64008PBd pBd = new C64008PBd(this); LIZ(pBd, C64022PBr.LIZ()); return LIZ(pCi, pBd); } private void LIZJ() { this.LIZJ.save(); this.LJII.push(this.LJI); this.LJI = new C64008PBd(this, this.LJI); } private void LIZJ(AbstractC64035PCe pCe) { LIZ(pCe, pCe.LJIIIZ); } private void LIZJ(AbstractC64035PCe pCe, C64028PBx pBx) { C64039PCi LIZIZ2 = pCe.LJIILJJIL.LIZIZ(this.LJI.LIZ.LJIJJ); if (LIZIZ2 == null) { LIZIZ("ClipPath reference '%s' not found", this.LJI.LIZ.LJIJJ); return; } PCY pcy = (PCY) LIZIZ2; if (pcy.LJIIIIZZ.isEmpty()) { this.LIZJ.clipRect(0, 0, 0, 0); return; } boolean z = pcy.LIZ == null || pcy.LIZ.booleanValue(); if (!(pCe instanceof PCX) || z) { LJIIJJI(); if (!z) { Matrix matrix = new Matrix(); matrix.preTranslate(pBx.LIZ, pBx.LIZIZ); matrix.preScale(pBx.LIZJ, pBx.LIZLLL); this.LIZJ.concat(matrix); } if (pcy.LIZIZ != null) { this.LIZJ.concat(pcy.LIZIZ); } this.LJI = LIZJ((C64039PCi) pcy); LIZJ((AbstractC64035PCe) pcy); Path path = new Path(); for (C64039PCi pCi : pcy.LJIIIIZZ) { LIZ(pCi, true, path, new Matrix()); } this.LIZJ.clipPath(path); LJIIL(); return; } LIZ("<clipPath clipPathUnits=\"objectBoundingBox\"> is not supported when referenced from container elements (like %s)", pCe.LIZ()); } public static void LIZJ(String str, Object... objArr) { LLog.LIZ(3, "SVGAndroidRenderer", AnonymousClass0EJ.LIZ(str, objArr)); } private void LIZLLL() { this.LIZJ.restore(); this.LJI = this.LJII.pop(); } private void LJ() { this.LJIIIIZZ.pop(); this.LJIIIZ.pop(); } private boolean LJFF() { if (!LJI()) { return false; } this.LIZJ.saveLayerAlpha(null, LIZ(this.LJI.LIZ.LJIIL.floatValue()), 31); this.LJII.push(this.LJI); this.LJI = new C64008PBd(this, this.LJI); return true; } private boolean LJI() { return this.LJI.LIZ.LJIIL.floatValue() < 1.0f; } private boolean LJII() { if (this.LJI.LIZ.LJIILLIIL != null) { return this.LJI.LIZ.LJIILLIIL.booleanValue(); } return true; } private boolean LJIIIIZZ() { if (this.LJI.LIZ.LJIIZILJ != null) { return this.LJI.LIZ.LJIIZILJ.booleanValue(); } return true; } private Path.FillType LJIIIZ() { return (this.LJI.LIZ.LIZJ == null || this.LJI.LIZ.LIZJ != PCJ.EvenOdd) ? Path.FillType.WINDING : Path.FillType.EVEN_ODD; } private void LJIIJ() { int i2; if (this.LJI.LIZ.LJJI instanceof PCC) { i2 = ((PCC) this.LJI.LIZ.LJJI).LIZ; } else if (this.LJI.LIZ.LJJI instanceof C64042PCl) { i2 = this.LJI.LIZ.LJIILIIL.LIZ; } else { return; } if (this.LJI.LIZ.LJJIFFI != null) { i2 = LIZ(i2, this.LJI.LIZ.LJJIFFI.floatValue()); } this.LIZJ.drawColor(i2); } private void LJIIJJI() { C47981ut.LIZ(this.LIZJ, C47981ut.LIZ); this.LJII.push(this.LJI); this.LJI = new C64008PBd(this, this.LJI); } private void LJIIL() { this.LIZJ.restore(); this.LJI = this.LJII.pop(); } private Path.FillType LJIILIIL() { return (this.LJI.LIZ.LJIJJLI == null || this.LJI.LIZ.LJIJJLI != PCJ.EvenOdd) ? Path.FillType.WINDING : Path.FillType.EVEN_ODD; } public final C64028PBx LIZ() { return this.LJI.LJI != null ? this.LJI.LJI : this.LJI.LJFF; } public final void LIZ(C64021PBq pBq, PCG pcg) { Objects.requireNonNull(pcg, "renderOptions shouldn't be null"); this.LJFF = pBq; PCN pcn = pBq.LIZ; if (pcn == null) { LIZ("Nothing to render. Document is empty.", new Object[0]); return; } C64028PBx pBx = pcn.LJIIZILJ; C64030PBz pBz = pcn.LJIILLIIL; LIZIZ(); LIZIZ((C64039PCi) pcn); LIZJ(); LIZ(pcn, new C64028PBx(pcg.LIZIZ), pBx, pBz); LIZLLL(); } public final void LIZ(PC9 pc9, C64030PBz pBz, Bitmap bitmap) { int i2 = 0; if (bitmap == null) { LIZIZ("Could not locate image '%s'", pc9.LIZ); return; } C64028PBx pBx = new C64028PBx(0.0f, 0.0f, (float) bitmap.getWidth(), (float) bitmap.getHeight()); LIZ(this.LJI, pc9); if (LJII() && LJIIIIZZ()) { if (pc9.LJFF != null) { this.LIZJ.concat(pc9.LJFF); } this.LJI.LJFF = new C64028PBx(pc9.LIZIZ != null ? pc9.LIZIZ.LIZ(this) : 0.0f, pc9.LIZJ != null ? pc9.LIZJ.LIZIZ(this) : 0.0f, pc9.LIZLLL.LIZ(this), pc9.LJ.LIZ(this)); if (!this.LJI.LIZ.LJIILJJIL.booleanValue()) { LIZ(this.LJI.LJFF.LIZ, this.LJI.LJFF.LIZIZ, this.LJI.LJFF.LIZJ, this.LJI.LJFF.LIZLLL); } pc9.LJIIIZ = this.LJI.LJFF; LIZ((AbstractC64035PCe) pc9); LIZJ((AbstractC64035PCe) pc9); boolean LJFF2 = LJFF(); LJIIJ(); this.LIZJ.save(); this.LIZJ.concat(LIZ(this.LJI.LJFF, pBx, pBz)); if (this.LJI.LIZ.LJJIII != PC7.optimizeSpeed) { i2 = 2; } this.LIZJ.drawBitmap(bitmap, 0.0f, 0.0f, new Paint(i2)); this.LIZJ.restore(); if (LJFF2) { LIZLLL(); } } } }