214 lines
4.4 KiB
Smali
214 lines
4.4 KiB
Smali
.class final Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;
|
|
.super Ljava/lang/Object;
|
|
.source "BarcodeMatrix.java"
|
|
|
|
|
|
# instance fields
|
|
.field private currentRow:I
|
|
|
|
.field private final height:I
|
|
|
|
.field private final matrix:[Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
.field private final width:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(II)V
|
|
.locals 6
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
add-int/lit8 p1, p1, 0x2
|
|
|
|
.line 2
|
|
new-array v0, p1, [Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
iput-object v0, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->matrix:[Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
.line 3
|
|
array-length v0, v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-lt v2, v0, :cond_0
|
|
|
|
mul-int/lit8 p2, p2, 0x11
|
|
|
|
.line 4
|
|
iput p2, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->width:I
|
|
|
|
.line 5
|
|
iput p1, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->height:I
|
|
|
|
.line 6
|
|
iput v1, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->currentRow:I
|
|
|
|
return-void
|
|
|
|
.line 7
|
|
:cond_0
|
|
iget-object v3, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->matrix:[Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
new-instance v4, Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
add-int/lit8 v5, p2, 0x4
|
|
|
|
mul-int/lit8 v5, v5, 0x11
|
|
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
invoke-direct {v4, v5}, Lcom/google/zxing/pdf417/encoder/BarcodeRow;-><init>(I)V
|
|
|
|
aput-object v4, v3, v2
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getCurrentRow()Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->matrix:[Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
iget v1, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->currentRow:I
|
|
|
|
aget-object v0, v0, v1
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMatrix()[[B
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0, v0}, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->getScaledMatrix(II)[[B
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getScaledMatrix(I)[[B
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1, p1}, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->getScaledMatrix(II)[[B
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getScaledMatrix(II)[[B
|
|
.locals 7
|
|
|
|
.line 2
|
|
iget v0, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->height:I
|
|
|
|
mul-int/2addr v0, p2
|
|
|
|
iget v1, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->width:I
|
|
|
|
mul-int/2addr v1, p1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
new-array v2, v2, [I
|
|
|
|
const/4 v3, 0x1
|
|
|
|
aput v1, v2, v3
|
|
|
|
const/4 v1, 0x0
|
|
|
|
aput v0, v2, v1
|
|
|
|
const-class v0, B
|
|
|
|
invoke-static {v0, v2}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [[B
|
|
|
|
.line 3
|
|
iget v2, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->height:I
|
|
|
|
mul-int/2addr v2, p2
|
|
|
|
:goto_0
|
|
if-lt v1, v2, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
sub-int v4, v2, v1
|
|
|
|
sub-int/2addr v4, v3
|
|
|
|
.line 4
|
|
iget-object v5, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->matrix:[Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
div-int v6, v1, p2
|
|
|
|
aget-object v5, v5, v6
|
|
|
|
invoke-virtual {v5, p1}, Lcom/google/zxing/pdf417/encoder/BarcodeRow;->getScaledRow(I)[B
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v0, v4
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public set(IIB)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->matrix:[Lcom/google/zxing/pdf417/encoder/BarcodeRow;
|
|
|
|
aget-object p2, v0, p2
|
|
|
|
invoke-virtual {p2, p1, p3}, Lcom/google/zxing/pdf417/encoder/BarcodeRow;->set(IB)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setMatrix(IIZ)V
|
|
.locals 0
|
|
|
|
int-to-byte p3, p3
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->set(IIB)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public startRow()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->currentRow:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lcom/google/zxing/pdf417/encoder/BarcodeMatrix;->currentRow:I
|
|
|
|
return-void
|
|
.end method
|