what-the-bank/sources/com/kofax/mobile/sdk/k/a.java

85 lines
2.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.mobile.sdk.k;
import android.graphics.Point;
import com.kofax.kmc.ken.engines.data.BoundingTetragon;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes3.dex */
public class a implements com.kofax.mobile.sdk._internal.capture.b {
private final BoundingTetragon EW;
private Point EX;
private BoundingTetragon EY;
private final int _height;
private final int _width;
private final int jN;
public a(BoundingTetragon boundingTetragon, int i, int i2, int i3) {
if (i3 % 90 != 0) {
throw new IllegalArgumentException();
}
this.EW = boundingTetragon;
this.jN = i3;
this._width = i;
this._height = i2;
}
@Override // com.kofax.mobile.sdk._internal.capture.b
public int getWidth() {
if (this.EX == null) {
this.EX = kI();
}
return this.EX.x;
}
@Override // com.kofax.mobile.sdk._internal.capture.b
public int getHeight() {
if (this.EX == null) {
this.EX = kI();
}
return this.EX.y;
}
@Override // com.kofax.mobile.sdk._internal.capture.b
public BoundingTetragon bs() {
if (this.EY == null) {
this.EY = kH();
}
return this.EY;
}
private BoundingTetragon kH() {
BoundingTetragon boundingTetragon = this.EW;
if (this.jN == 0 || boundingTetragon == null) {
return boundingTetragon;
}
BoundingTetragon m268clone = boundingTetragon.m268clone();
m268clone.rotate(this._width, this._height, l(this.jN));
return m268clone;
}
private Point kI() {
return b(this._width, this._height, this.jN);
}
private static Point b(int i, int i2, int i3) {
if (i3 % CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA256 != 0) {
i2 = i;
i = i2;
}
return new Point(i, i2);
}
private static BoundingTetragon.Rotation l(int i) {
if (i == 90) {
return BoundingTetragon.Rotation.RIGHT;
}
if (i == 180) {
return BoundingTetragon.Rotation.FLIP;
}
if (i == 270) {
return BoundingTetragon.Rotation.LEFT;
}
throw new IllegalArgumentException();
}
}