正在查看: SpinDisplay v2.0.2.6 应用的 ResizableImageView.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpinDisplay v2.0.2.6 应用的 ResizableImageView.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.dmz.f20ad.view;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.media.ExifInterface;
import android.net.Uri;
import android.provider.MediaStore;
import android.util.AttributeSet;
import android.util.Log;
import android.view.ScaleGestureDetector;
import android.widget.ImageView;
import b.b.p.m;
import b.u.y;
import com.dmz.f20ad.App;
import com.dmz.f20ad.libjpeg.Libjpeg;
import com.dmz.f20ad.view.ResizableImageView;
import d.e.a.l;
import d.e.a.p.o0;
import d.e.a.t.d;
import g.a.e;
import g.a.s.b;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.concurrent.Callable;
import me.zhanghai.android.materialprogressbar.SingleCircularProgressDrawable;
public class ResizableImageView extends m {
public static float G = 672.0f;
public g.a.n.a A;
public float B;
public float C;
public float D;
public boolean E;
public int F;
public final ScaleGestureDetector f3289d;
public float f3290e;
public int f3291f;
public int f3292g;
public int f3293h;
public float f3294i;
public float f3295j;
public float f3296k;
public float f3297l;
public float f3298m;
public final Matrix f3299n;
public float o;
public float p;
public float q;
public float r;
public boolean s;
public boolean t;
public boolean u;
public float v;
public float w;
public d[] x;
public HashMap<String, Bitmap> y;
public boolean z;
public class a implements ScaleGestureDetector.OnScaleGestureListener {
public a() {
}
@Override
public boolean onScale(ScaleGestureDetector scaleGestureDetector) {
if (ResizableImageView.this.getDrawable() == null) {
return true;
}
float scaleFactor = scaleGestureDetector.getScaleFactor();
ResizableImageView resizableImageView = ResizableImageView.this;
resizableImageView.q *= scaleFactor;
resizableImageView.f3299n.postScale(scaleFactor, scaleFactor, scaleGestureDetector.getFocusX(), scaleGestureDetector.getFocusY());
ResizableImageView.this.a();
ResizableImageView resizableImageView2 = ResizableImageView.this;
resizableImageView2.setImageMatrix(resizableImageView2.f3299n);
return true;
}
@Override
public boolean onScaleBegin(ScaleGestureDetector scaleGestureDetector) {
return true;
}
@Override
public void onScaleEnd(ScaleGestureDetector scaleGestureDetector) {
}
}
public ResizableImageView(Context context) {
this(context, null);
}
public ResizableImageView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public ResizableImageView(Context context, AttributeSet attributeSet, int i2) {
super(context, attributeSet, i2);
this.f3299n = new Matrix();
this.s = true;
this.t = false;
this.u = false;
this.x = new d[0];
this.y = new HashMap<>();
this.z = false;
this.B = SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
this.C = SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
this.D = SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
this.E = false;
this.F = 30;
this.A = new g.a.n.a();
setScaleType(ImageView.ScaleType.MATRIX);
this.f3289d = new ScaleGestureDetector(context, new a());
new l() {
};
}
public static void a(Integer num) {
}
private RectF getBitmapMatrixRectF() {
RectF rectF = new RectF();
if (getDrawable() != null) {
rectF.set(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, r1.getIntrinsicWidth(), r1.getIntrinsicHeight());
this.f3299n.mapRect(rectF);
}
return rectF;
}
public final Bitmap a(int i2, boolean z) {
int i3;
Bitmap createBitmap = Bitmap.createBitmap(i2, i2, Bitmap.Config.ARGB_8888);
int i4 = 0;
Canvas a2 = d.b.a.a.a.a(createBitmap, 0);
Paint paint = new Paint();
paint.setStyle(Paint.Style.STROKE);
paint.setAntiAlias(false);
paint.setStrokeWidth(1.0f);
int i5 = i2 / 2;
while (true) {
if (i4 >= this.F) {
return createBitmap;
}
if (z) {
double d2 = (((250.0d / (r4 * r4)) * (i4 - r4)) * (i4 - r4)) - 80.0d;
if (d2 < 0.0d) {
d2 = 0.0d;
}
i3 = (int) d2;
} else {
i3 = (int) (220.0d - (((220.0d / (r4 * r4)) * (i4 - r4)) * (i4 - r4)));
}
paint.setColor(Color.argb(i3, 10, 10, 10));
float f2 = i5;
a2.drawCircle(f2, f2, i5 - i4, paint);
i4++;
}
}
public final Bitmap a(Rect rect, Bitmap bitmap) {
float f2 = G;
Bitmap createBitmap = Bitmap.createBitmap((int) f2, (int) f2, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(-16777216);
canvas.drawARGB(0, 0, 0, 0);
float f3 = G;
canvas.drawCircle(f3 / 2.0f, f3 / 2.0f, f3 / 2.0f, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, (Rect) null, rect, paint);
return createBitmap;
}
public final Bitmap a(Rect rect, Bitmap bitmap, Bitmap bitmap2) {
float f2 = G;
Bitmap createBitmap = Bitmap.createBitmap((int) f2, (int) f2, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
Paint paint = new Paint();
if (this.z) {
paint.setAlpha(255);
canvas.drawBitmap(bitmap, (Rect) null, rect, paint);
} else {
paint.setAntiAlias(true);
paint.setColor(-16777216);
canvas.drawARGB(0, 0, 0, 0);
float f3 = G;
canvas.drawCircle(f3 / 2.0f, f3 / 2.0f, f3 / 2.0f, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, (Rect) null, rect, paint);
if (bitmap2 != null) {
Paint paint2 = new Paint();
paint2.setAlpha(255);
float f4 = G;
canvas.drawBitmap(bitmap2, (Rect) null, new Rect(-1, -1, ((int) f4) + 2, ((int) f4) + 2), paint2);
}
}
return createBitmap;
}
public Integer a(int i2, int i3, int i4, int i5, int i6, String str, HashMap hashMap, String str2, o0 o0Var, int i7) {
String str3 = str;
Matrix matrix = new Matrix();
float[] fArr = {1.0f, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, 1.0f, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, 1.0f};
matrix.setValues(fArr);
if (this.t) {
fArr[4] = -1.0f;
matrix.setValues(fArr);
matrix.postTranslate(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, this.w);
}
int i8 = 0;
if (this.u) {
fArr[0] = -1.0f;
matrix.setValues(fArr);
matrix.postTranslate(this.v, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL);
}
int i9 = i2;
while (i9 <= i3) {
if (App.f2843l) {
return Integer.valueOf(i8);
}
int i10 = ((i4 + i9) * i5) / i6;
if (new File(str3 + "/" + i10 + ".bin").exists()) {
Bitmap decodeFile = BitmapFactory.decodeFile(str3 + "/" + i10 + ".bin");
if (decodeFile != null) {
Bitmap createBitmap = Bitmap.createBitmap(decodeFile, 0, 0, decodeFile.getWidth(), decodeFile.getHeight(), matrix, true);
d[] dVarArr = this.x;
int length = dVarArr.length;
int i11 = 0;
while (i11 < length) {
d dVar = dVarArr[i11];
d[] dVarArr2 = dVarArr;
Bitmap a2 = a((Rect) hashMap.get(dVar.f5348a), createBitmap, this.y.get(dVar.f5348a));
StringBuilder a3 = d.b.a.a.a.a(str2);
a3.append(dVar.f5348a);
a3.append("/");
a3.append(i9);
a3.append(".bin");
String sb = a3.toString();
File file = new File(sb);
if (!file.exists()) {
file.createNewFile();
}
if (o0Var == null) {
new Libjpeg().nativeCompressBitmap2(a2, i7, sb);
} else {
o0Var.a(a2, sb, i7);
}
i11++;
dVarArr = dVarArr2;
}
}
} else if (i9 > 1) {
for (d dVar2 : this.x) {
StringBuilder a4 = d.b.a.a.a.a(str2);
a4.append(i9 - 1);
a4.append(".bin");
y.a(a4.toString(), str2 + i9 + ".bin");
}
} else {
Thread.sleep(1L);
str3 = str;
i8 = 0;
}
i9++;
Thread.sleep(1L);
str3 = str;
i8 = 0;
}
return 0;
}
public final void a() {
if (this.s) {
RectF bitmapMatrixRectF = getBitmapMatrixRectF();
float f2 = bitmapMatrixRectF.left;
float f3 = this.f3295j;
float f4 = SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
float f5 = f2 >= f3 ? f3 - f2 : SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
float f6 = bitmapMatrixRectF.right;
float f7 = this.f3296k;
if (f6 <= f7) {
f5 = f7 - f6;
}
float f8 = bitmapMatrixRectF.top;
float f9 = this.f3297l;
if (f8 >= f9) {
f4 = f9 - f8;
}
float f10 = bitmapMatrixRectF.bottom;
float f11 = this.f3298m;
if (f10 <= f11) {
f4 = f11 - f10;
}
this.f3299n.postTranslate(f5, f4);
}
}
public void a(int i2, int i3) {
this.B = i2 > i3 ? i3 / 2 : i2 / 2;
this.C = i2;
this.D = i3;
}
public void a(Bitmap bitmap) {
setImageBitmap(bitmap);
}
public void a(String str, int i2, int i3, int i4, o0 o0Var, boolean z) {
d[] dVarArr = this.x;
if (dVarArr == null || dVarArr.length == 0) {
return;
}
if (o0Var != null) {
float f2 = G;
o0Var.a((int) f2, (int) f2);
}
d[] dVarArr2 = this.x;
d dVar = dVarArr2[0];
int i5 = dVar.f5349b;
int i6 = dVar.f5350c;
int i7 = dVar.f5351d;
int i8 = i5 + i7;
int i9 = i6 + i7;
float f3 = G / i7;
for (d dVar2 : dVarArr2) {
i5 = Math.min(i5, dVar2.f5349b);
i6 = Math.min(i6, dVar2.f5350c);
i8 = Math.max(i8, dVar2.f5349b + dVar2.f5351d);
i9 = Math.max(i9, dVar2.f5350c + dVar2.f5351d);
}
int width = (getWidth() - (i8 - i5)) / 2;
int height = (getHeight() - (i9 - i6)) / 2;
RectF imageRectF = getImageRectF();
float f4 = imageRectF.left;
float f5 = imageRectF.top;
float width2 = imageRectF.width() * f3;
float height2 = imageRectF.height() * f3;
HashMap<String, Rect> hashMap = new HashMap<>();
d[] dVarArr3 = this.x;
int length = dVarArr3.length;
int i10 = 0;
while (i10 < length) {
int i11 = (int) (((f4 - r10.f5349b) - width) * f3);
int i12 = width;
int i13 = (int) (((f5 - r10.f5350c) - height) * f3);
hashMap.put(dVarArr3[i10].f5348a, new Rect(i11, i13, (int) (i11 + width2), (int) (i13 + height2)));
i10++;
width = i12;
height = height;
f4 = f4;
}
File a2 = App.f2838g.a();
if (!a2.exists()) {
a2.mkdirs();
}
y.a(a2);
String format = String.format("%s/%s/", App.f2838g.d(), "clipimage");
File file = new File(format);
if (!file.exists()) {
file.mkdir();
}
for (d dVar3 : this.x) {
File file2 = new File(d.b.a.a.a.a(d.b.a.a.a.a(format), dVar3.f5348a, "/"));
if (!file2.exists()) {
file2.mkdirs();
}
}
int i14 = (i3 - i2) * i4;
int i15 = i2 * i4;
int i16 = i14 / 3;
int i17 = z ? 68 : 50;
b(i15, 1, i16, 20, i4, str, hashMap, format, o0Var, i17);
int i18 = i16 + 1;
int i19 = (i14 * 2) / 3;
b(i15, i18, i19, 20, i4, str, hashMap, format, o0Var, i17);
b(i15, i19 + 1, i14, 20, i4, str, hashMap, format, o0Var, i17);
}
public void a(boolean z) {
this.s = z;
}
public void a(boolean z, int i2) {
this.E = z;
this.F = i2;
d[] dVarArr = this.x;
if (dVarArr == null || dVarArr.length == 0) {
return;
}
this.y = a(dVarArr);
}
public final void b(final int i2, final int i3, final int i4, final int i5, final int i6, final String str, final HashMap<String, Rect> hashMap, final String str2, final o0 o0Var, final int i7) {
Log.d("wyt quality", "pictureHandle: " + i7);
this.A.c(e.a(new Callable() {
@Override
public final Object call() {
return ResizableImageView.this.a(i3, i4, i2, i5, i6, str, hashMap, str2, o0Var, i7);
}
}).b(b.b()).a(g.a.m.b.a.a()).b((g.a.p.b) new g.a.p.b() {
@Override
public final void a(Object obj) {
ResizableImageView.a((Integer) obj);
}
}));
}
public void d() {
if (getDrawable() == null) {
return;
}
this.t = !this.t;
RectF bitmapMatrixRectF = getBitmapMatrixRectF();
float[] fArr = new float[9];
this.f3299n.getValues(fArr);
fArr[4] = fArr[4] * (-1.0f);
this.f3299n.setValues(fArr);
this.f3299n.postTranslate(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, bitmapMatrixRectF.height() * (fArr[4] >= SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL ? -1 : 1));
a();
setImageMatrix(this.f3299n);
}
public void e() {
if (getDrawable() == null) {
return;
}
this.u = !this.u;
RectF bitmapMatrixRectF = getBitmapMatrixRectF();
float[] fArr = new float[9];
this.f3299n.getValues(fArr);
fArr[0] = fArr[0] * (-1.0f);
this.f3299n.setValues(fArr);
this.f3299n.postTranslate(bitmapMatrixRectF.width() * (fArr[0] >= SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL ? -1 : 1), SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL);
a();
setImageMatrix(this.f3299n);
}
public RectF getImageRectF() {
RectF rectF = new RectF(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, this.v, this.w);
this.f3299n.mapRect(rectF);
return rectF;
}
@Override
public void onLayout(boolean z, int i2, int i3, int i4, int i5) {
super.onLayout(z, i2, i3, i4, i5);
if (z) {
this.f3293h = getWidth();
this.f3292g = getHeight();
float f2 = this.B;
if (f2 <= SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL) {
f2 = (float) ((Math.min(getWidth(), getHeight()) * 0.618d) / 2.0d);
}
this.f3294i = f2;
float f3 = this.f3293h;
float f4 = this.f3294i;
this.f3295j = (f3 - (f4 * 2.0f)) / 2.0f;
this.f3297l = (this.f3292g - (f4 * 2.0f)) / 2.0f;
this.f3296k = (f4 * 2.0f) + this.f3295j;
this.f3298m = (f4 * 2.0f) + this.f3297l;
}
}
@Override
@android.annotation.SuppressLint({"ClickableViewAccessibility"})
public boolean onTouchEvent(android.view.MotionEvent r7) {
throw new UnsupportedOperationException("Method not decompiled: com.dmz.f20ad.view.ResizableImageView.onTouchEvent(android.view.MotionEvent):boolean");
}
public void setBitmap(Bitmap bitmap) {
a(bitmap, 0);
}
public void setBitmap(Uri uri) {
Cursor query = getContext().getContentResolver().query(uri, new String[]{"_data"}, null, null, null);
query.moveToFirst();
String string = query.getString(query.getColumnIndexOrThrow("_data"));
query.close();
ExifInterface exifInterface = new ExifInterface(string);
int i2 = 0;
int attributeInt = exifInterface.getAttributeInt("Orientation", 0);
if (attributeInt == 3) {
i2 = 180;
} else if (attributeInt == 6) {
i2 = 90;
} else if (attributeInt == 8) {
i2 = 270;
}
a(MediaStore.Images.Media.getBitmap(getContext().getContentResolver(), uri), i2);
}
public void setDevices(d[] dVarArr) {
this.x = dVarArr;
this.y = a(dVarArr);
}
public void a(o0 o0Var, String str, boolean z) {
int i2;
d[] dVarArr = this.x;
if (dVarArr == null || dVarArr.length == 0) {
return;
}
if (o0Var != null) {
float f2 = G;
o0Var.a((int) f2, (int) f2);
}
d dVar = this.x[0];
int i3 = dVar.f5349b;
int i4 = dVar.f5350c;
int i5 = dVar.f5351d;
int i6 = i3 + i5;
int i7 = i4 + i5;
float f3 = G / i5;
Log.d("wyt", "clipToCircle: scale" + f3);
for (d dVar2 : this.x) {
i3 = Math.min(i3, dVar2.f5349b);
i4 = Math.min(i4, dVar2.f5350c);
i6 = Math.max(i6, dVar2.f5349b + dVar2.f5351d);
i7 = Math.max(i7, dVar2.f5350c + dVar2.f5351d);
}
int width = (getWidth() - (i6 - i3)) / 2;
int height = (getHeight() - (i7 - i4)) / 2;
Bitmap decodeFile = BitmapFactory.decodeFile(str);
RectF imageRectF = getImageRectF();
float f4 = imageRectF.left;
float f5 = imageRectF.top;
float width2 = imageRectF.width() * f3;
float height2 = imageRectF.height() * f3;
HashMap hashMap = new HashMap();
d[] dVarArr2 = this.x;
int length = dVarArr2.length;
int i8 = 0;
while (i8 < length) {
float f6 = f4;
int i9 = (int) (((f4 - r13.f5349b) - width) * f3);
int i10 = width;
int i11 = (int) (((f5 - r13.f5350c) - height) * f3);
hashMap.put(dVarArr2[i8].f5348a, new Rect(i9, i11, (int) (i9 + width2), (int) (i11 + height2)));
i8++;
f4 = f6;
width = i10;
height = height;
f5 = f5;
}
int i12 = z ? 68 : 50;
String format = String.format("%s/%s/", App.f2838g.d(), "clipimage");
File file = new File(format);
if (!file.exists()) {
file.mkdirs();
}
for (d dVar3 : this.x) {
File file2 = new File(d.b.a.a.a.a(d.b.a.a.a.a(format), dVar3.f5348a, "/"));
if (!file2.exists()) {
file2.mkdirs();
}
}
Matrix matrix = new Matrix();
float[] fArr = {1.0f, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, 1.0f, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, 1.0f};
matrix.setValues(fArr);
if (this.t) {
fArr[4] = -1.0f;
matrix.setValues(fArr);
matrix.postTranslate(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL, this.w);
}
if (this.u) {
i2 = 0;
fArr[0] = -1.0f;
matrix.setValues(fArr);
matrix.postTranslate(this.v, SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL);
} else {
i2 = 0;
}
Bitmap createBitmap = Bitmap.createBitmap(decodeFile, 0, 0, decodeFile.getWidth(), decodeFile.getHeight(), matrix, true);
d[] dVarArr3 = this.x;
int length2 = dVarArr3.length;
while (i2 < length2) {
d dVar4 = dVarArr3[i2];
Bitmap a2 = a((Rect) hashMap.get(dVar4.f5348a), createBitmap, this.y.get(dVar4.f5348a));
StringBuilder a3 = d.b.a.a.a.a(format);
a3.append(dVar4.f5348a);
a3.append("/");
a3.append(1);
a3.append(".bin");
String sb = a3.toString();
File file3 = new File(sb);
if (!file3.exists()) {
try {
file3.createNewFile();
} catch (IOException e2) {
e2.printStackTrace();
}
}
if (o0Var == null) {
new Libjpeg().nativeCompressBitmap2(a2, i12, sb);
} else {
o0Var.a(a2, sb, i12);
}
i2++;
}
}
public final java.util.HashMap<java.lang.String, android.graphics.Bitmap> a(d.e.a.t.d[] r25) {
throw new UnsupportedOperationException("Method not decompiled: com.dmz.f20ad.view.ResizableImageView.a(d.e.a.t.d[]):java.util.HashMap");
}
public void a(Bitmap bitmap, int i2) {
float f2;
setImageBitmap(bitmap);
this.f3299n.reset();
float width = bitmap.getWidth();
float height = bitmap.getHeight();
this.v = width;
this.w = height;
this.f3299n.postRotate(i2, width / 2.0f, height / 2.0f);
this.r = (this.f3294i * 2.0f) / Math.min(width, height);
if (!this.s) {
this.r *= 0.5f;
}
float max = Math.max(width, height);
float f3 = this.C;
if (f3 != SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL) {
float f4 = this.D;
if (f4 != SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL) {
f2 = f3 / width;
float f5 = f4 / height;
if (f2 <= f5) {
f2 = f5;
}
this.q = f2;
n.a.a.f7520c.a("mRadius: %s, mRatio: %s, bitmapWidth: %s, bitmapHeight: %s", Float.valueOf(this.f3294i), Float.valueOf(this.q), Float.valueOf(width), Float.valueOf(height));
Matrix matrix = this.f3299n;
float f6 = this.q;
matrix.postScale(f6, f6);
float f7 = this.f3293h;
float f8 = this.q;
this.f3299n.postTranslate((f7 - (width * f8)) / 2.0f, (this.f3292g - (height * f8)) / 2.0f);
this.f3290e = SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
setImageMatrix(this.f3299n);
}
}
f2 = (this.f3294i * 2.0f) / max;
this.q = f2;
n.a.a.f7520c.a("mRadius: %s, mRatio: %s, bitmapWidth: %s, bitmapHeight: %s", Float.valueOf(this.f3294i), Float.valueOf(this.q), Float.valueOf(width), Float.valueOf(height));
Matrix matrix2 = this.f3299n;
float f62 = this.q;
matrix2.postScale(f62, f62);
float f72 = this.f3293h;
float f82 = this.q;
this.f3299n.postTranslate((f72 - (width * f82)) / 2.0f, (this.f3292g - (height * f82)) / 2.0f);
this.f3290e = SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
setImageMatrix(this.f3299n);
}
}