apkfuckery/com.discord/smali/com/android/camera/CropImageView.smali
2019-02-04 21:05:16 +01:00

1013 lines
25 KiB
Smali

.class Lcom/android/camera/CropImageView;
.super Lcom/android/camera/ImageViewTouchBase;
.source "CropImage.java"
# instance fields
.field mHighlightViews:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/camera/HighlightView;",
">;"
}
.end annotation
.end field
.field mLastX:F
.field mLastY:F
.field mMotionEdge:I
.field mMotionHighlightView:Lcom/android/camera/HighlightView;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.prologue
invoke-direct {p0, p1, p2}, Lcom/android/camera/ImageViewTouchBase;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
return-void
.end method
.method private centerBasedOnHighlightView(Lcom/android/camera/HighlightView;)V
.locals 14
.param p1, "hv" # Lcom/android/camera/HighlightView;
.prologue
iget-object v1, p1, Lcom/android/camera/HighlightView;->mDrawRect:Landroid/graphics/Rect;
.local v1, "drawRect":Landroid/graphics/Rect;
invoke-virtual {v1}, Landroid/graphics/Rect;->width()I
move-result v9
int-to-float v5, v9
.local v5, "width":F
invoke-virtual {v1}, Landroid/graphics/Rect;->height()I
move-result v9
int-to-float v2, v9
.local v2, "height":F
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getWidth()I
move-result v9
int-to-float v4, v9
.local v4, "thisWidth":F
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getHeight()I
move-result v9
int-to-float v3, v9
.local v3, "thisHeight":F
div-float v9, v4, v5
const v10, 0x3f19999a # 0.6f
mul-float v6, v9, v10
.local v6, "z1":F
div-float v9, v3, v2
const v10, 0x3f19999a # 0.6f
mul-float v7, v9, v10
.local v7, "z2":F
invoke-static {v6, v7}, Ljava/lang/Math;->min(FF)F
move-result v8
.local v8, "zoom":F
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getScale()F
move-result v9
mul-float/2addr v8, v9
const/high16 v9, 0x3f800000 # 1.0f
invoke-static {v9, v8}, Ljava/lang/Math;->max(FF)F
move-result v8
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getScale()F
move-result v9
sub-float v9, v8, v9
invoke-static {v9}, Ljava/lang/Math;->abs(F)F
move-result v9
div-float/2addr v9, v8
float-to-double v10, v9
const-wide v12, 0x3fb999999999999aL # 0.1
cmpl-double v9, v10, v12
if-lez v9, :cond_0
const/4 v9, 0x2
new-array v0, v9, [F
const/4 v9, 0x0
iget-object v10, p1, Lcom/android/camera/HighlightView;->mCropRect:Landroid/graphics/RectF;
invoke-virtual {v10}, Landroid/graphics/RectF;->centerX()F
move-result v10
aput v10, v0, v9
const/4 v9, 0x1
iget-object v10, p1, Lcom/android/camera/HighlightView;->mCropRect:Landroid/graphics/RectF;
invoke-virtual {v10}, Landroid/graphics/RectF;->centerY()F
move-result v10
aput v10, v0, v9
.local v0, "coordinates":[F
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getImageMatrix()Landroid/graphics/Matrix;
move-result-object v9
invoke-virtual {v9, v0}, Landroid/graphics/Matrix;->mapPoints([F)V
const/4 v9, 0x0
aget v9, v0, v9
const/4 v10, 0x1
aget v10, v0, v10
const/high16 v11, 0x43960000 # 300.0f
invoke-virtual {p0, v8, v9, v10, v11}, Lcom/android/camera/CropImageView;->zoomTo(FFFF)V
.end local v0 # "coordinates":[F
:cond_0
invoke-direct {p0, p1}, Lcom/android/camera/CropImageView;->ensureVisible(Lcom/android/camera/HighlightView;)V
return-void
.end method
.method private ensureVisible(Lcom/android/camera/HighlightView;)V
.locals 10
.param p1, "hv" # Lcom/android/camera/HighlightView;
.prologue
const/4 v9, 0x0
iget-object v6, p1, Lcom/android/camera/HighlightView;->mDrawRect:Landroid/graphics/Rect;
.local v6, "r":Landroid/graphics/Rect;
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getLeft()I
move-result v7
iget v8, v6, Landroid/graphics/Rect;->left:I
sub-int/2addr v7, v8
invoke-static {v9, v7}, Ljava/lang/Math;->max(II)I
move-result v1
.local v1, "panDeltaX1":I
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getRight()I
move-result v7
iget v8, v6, Landroid/graphics/Rect;->right:I
sub-int/2addr v7, v8
invoke-static {v9, v7}, Ljava/lang/Math;->min(II)I
move-result v2
.local v2, "panDeltaX2":I
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getTop()I
move-result v7
iget v8, v6, Landroid/graphics/Rect;->top:I
sub-int/2addr v7, v8
invoke-static {v9, v7}, Ljava/lang/Math;->max(II)I
move-result v4
.local v4, "panDeltaY1":I
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getBottom()I
move-result v7
iget v8, v6, Landroid/graphics/Rect;->bottom:I
sub-int/2addr v7, v8
invoke-static {v9, v7}, Ljava/lang/Math;->min(II)I
move-result v5
.local v5, "panDeltaY2":I
if-eqz v1, :cond_2
move v0, v1
.local v0, "panDeltaX":I
:goto_0
if-eqz v4, :cond_3
move v3, v4
.local v3, "panDeltaY":I
:goto_1
if-nez v0, :cond_0
if-eqz v3, :cond_1
:cond_0
int-to-float v7, v0
int-to-float v8, v3
invoke-virtual {p0, v7, v8}, Lcom/android/camera/CropImageView;->panBy(FF)V
:cond_1
return-void
.end local v0 # "panDeltaX":I
.end local v3 # "panDeltaY":I
:cond_2
move v0, v2
goto :goto_0
.restart local v0 # "panDeltaX":I
:cond_3
move v3, v5
goto :goto_1
.end method
.method private recomputeFocus(Landroid/view/MotionEvent;)V
.locals 6
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
const/4 v5, 0x1
const/4 v2, 0x0
.local v2, "i":I
:goto_0
iget-object v3, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-ge v2, v3, :cond_0
iget-object v3, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/camera/HighlightView;
.local v1, "hv":Lcom/android/camera/HighlightView;
const/4 v3, 0x0
invoke-virtual {v1, v3}, Lcom/android/camera/HighlightView;->setFocus(Z)V
invoke-virtual {v1}, Lcom/android/camera/HighlightView;->invalidate()V
add-int/lit8 v2, v2, 0x1
goto :goto_0
.end local v1 # "hv":Lcom/android/camera/HighlightView;
:cond_0
const/4 v2, 0x0
:goto_1
iget-object v3, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-ge v2, v3, :cond_1
iget-object v3, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/camera/HighlightView;
.restart local v1 # "hv":Lcom/android/camera/HighlightView;
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v3
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v4
invoke-virtual {v1, v3, v4}, Lcom/android/camera/HighlightView;->getHit(FF)I
move-result v0
.local v0, "edge":I
if-eq v0, v5, :cond_2
invoke-virtual {v1}, Lcom/android/camera/HighlightView;->hasFocus()Z
move-result v3
if-nez v3, :cond_1
invoke-virtual {v1, v5}, Lcom/android/camera/HighlightView;->setFocus(Z)V
invoke-virtual {v1}, Lcom/android/camera/HighlightView;->invalidate()V
.end local v0 # "edge":I
.end local v1 # "hv":Lcom/android/camera/HighlightView;
:cond_1
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->invalidate()V
return-void
.restart local v0 # "edge":I
.restart local v1 # "hv":Lcom/android/camera/HighlightView;
:cond_2
add-int/lit8 v2, v2, 0x1
goto :goto_1
.end method
# virtual methods
.method public add(Lcom/android/camera/HighlightView;)V
.locals 1
.param p1, "hv" # Lcom/android/camera/HighlightView;
.prologue
iget-object v0, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->invalidate()V
return-void
.end method
.method protected onDraw(Landroid/graphics/Canvas;)V
.locals 2
.param p1, "canvas" # Landroid/graphics/Canvas;
.prologue
invoke-super {p0, p1}, Lcom/android/camera/ImageViewTouchBase;->onDraw(Landroid/graphics/Canvas;)V
const/4 v0, 0x0
.local v0, "i":I
:goto_0
iget-object v1, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-ge v0, v1, :cond_0
iget-object v1, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/camera/HighlightView;
invoke-virtual {v1, p1}, Lcom/android/camera/HighlightView;->draw(Landroid/graphics/Canvas;)V
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method protected onLayout(ZIIII)V
.locals 4
.param p1, "changed" # Z
.param p2, "left" # I
.param p3, "top" # I
.param p4, "right" # I
.param p5, "bottom" # I
.prologue
invoke-super/range {p0 .. p5}, Lcom/android/camera/ImageViewTouchBase;->onLayout(ZIIII)V
iget-object v1, p0, Lcom/android/camera/CropImageView;->mBitmapDisplayed:Lcom/android/camera/RotateBitmap;
invoke-virtual {v1}, Lcom/android/camera/RotateBitmap;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v1
if-eqz v1, :cond_1
iget-object v1, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_0
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/android/camera/HighlightView;
.local v0, "hv":Lcom/android/camera/HighlightView;
iget-object v2, v0, Lcom/android/camera/HighlightView;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getImageMatrix()Landroid/graphics/Matrix;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/graphics/Matrix;->set(Landroid/graphics/Matrix;)V
invoke-virtual {v0}, Lcom/android/camera/HighlightView;->invalidate()V
iget-boolean v2, v0, Lcom/android/camera/HighlightView;->mIsFocused:Z
if-eqz v2, :cond_0
invoke-direct {p0, v0}, Lcom/android/camera/CropImageView;->centerBasedOnHighlightView(Lcom/android/camera/HighlightView;)V
goto :goto_0
.end local v0 # "hv":Lcom/android/camera/HighlightView;
:cond_1
return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 11
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
const/4 v6, 0x0
const/4 v7, 0x1
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getContext()Landroid/content/Context;
move-result-object v0
check-cast v0, Lcom/android/camera/CropImage;
.local v0, "cropImage":Lcom/android/camera/CropImage;
iget-boolean v5, v0, Lcom/android/camera/CropImage;->mSaving:Z
if-eqz v5, :cond_0
move v5, v6
:goto_0
return v5
:cond_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v5
packed-switch v5, :pswitch_data_0
:cond_1
:goto_1
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v5
packed-switch v5, :pswitch_data_1
:cond_2
:goto_2
move v5, v7
goto :goto_0
:pswitch_0
iget-boolean v5, v0, Lcom/android/camera/CropImage;->mWaitingToPick:Z
if-eqz v5, :cond_3
invoke-direct {p0, p1}, Lcom/android/camera/CropImageView;->recomputeFocus(Landroid/view/MotionEvent;)V
goto :goto_1
:cond_3
const/4 v3, 0x0
.local v3, "i":I
:goto_3
iget-object v5, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v5}, Ljava/util/ArrayList;->size()I
move-result v5
if-ge v3, v5, :cond_1
iget-object v5, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v5, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/android/camera/HighlightView;
.local v2, "hv":Lcom/android/camera/HighlightView;
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v5
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v6
invoke-virtual {v2, v5, v6}, Lcom/android/camera/HighlightView;->getHit(FF)I
move-result v1
.local v1, "edge":I
if-eq v1, v7, :cond_5
iput v1, p0, Lcom/android/camera/CropImageView;->mMotionEdge:I
iput-object v2, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v5
iput v5, p0, Lcom/android/camera/CropImageView;->mLastX:F
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v5
iput v5, p0, Lcom/android/camera/CropImageView;->mLastY:F
iget-object v6, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
const/16 v5, 0x20
if-ne v1, v5, :cond_4
sget-object v5, Lcom/android/camera/HighlightView$ModifyMode;->Move:Lcom/android/camera/HighlightView$ModifyMode;
:goto_4
invoke-virtual {v6, v5}, Lcom/android/camera/HighlightView;->setMode(Lcom/android/camera/HighlightView$ModifyMode;)V
goto :goto_1
:cond_4
sget-object v5, Lcom/android/camera/HighlightView$ModifyMode;->Grow:Lcom/android/camera/HighlightView$ModifyMode;
goto :goto_4
:cond_5
add-int/lit8 v3, v3, 0x1
goto :goto_3
.end local v1 # "edge":I
.end local v2 # "hv":Lcom/android/camera/HighlightView;
.end local v3 # "i":I
:pswitch_1
iget-boolean v5, v0, Lcom/android/camera/CropImage;->mWaitingToPick:Z
if-eqz v5, :cond_9
const/4 v3, 0x0
.restart local v3 # "i":I
:goto_5
iget-object v5, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v5}, Ljava/util/ArrayList;->size()I
move-result v5
if-ge v3, v5, :cond_a
iget-object v5, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v5, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/android/camera/HighlightView;
.restart local v2 # "hv":Lcom/android/camera/HighlightView;
invoke-virtual {v2}, Lcom/android/camera/HighlightView;->hasFocus()Z
move-result v5
if-eqz v5, :cond_8
iput-object v2, v0, Lcom/android/camera/CropImage;->mCrop:Lcom/android/camera/HighlightView;
const/4 v4, 0x0
.local v4, "j":I
:goto_6
iget-object v5, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v5}, Ljava/util/ArrayList;->size()I
move-result v5
if-ge v4, v5, :cond_7
if-ne v4, v3, :cond_6
:goto_7
add-int/lit8 v4, v4, 0x1
goto :goto_6
:cond_6
iget-object v5, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v5, v4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/android/camera/HighlightView;
invoke-virtual {v5, v7}, Lcom/android/camera/HighlightView;->setHidden(Z)V
goto :goto_7
:cond_7
invoke-direct {p0, v2}, Lcom/android/camera/CropImageView;->centerBasedOnHighlightView(Lcom/android/camera/HighlightView;)V
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getContext()Landroid/content/Context;
move-result-object v5
check-cast v5, Lcom/android/camera/CropImage;
iput-boolean v6, v5, Lcom/android/camera/CropImage;->mWaitingToPick:Z
move v5, v7
goto/16 :goto_0
.end local v4 # "j":I
:cond_8
add-int/lit8 v3, v3, 0x1
goto :goto_5
.end local v2 # "hv":Lcom/android/camera/HighlightView;
.end local v3 # "i":I
:cond_9
iget-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
if-eqz v5, :cond_a
iget-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
invoke-direct {p0, v5}, Lcom/android/camera/CropImageView;->centerBasedOnHighlightView(Lcom/android/camera/HighlightView;)V
iget-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
sget-object v6, Lcom/android/camera/HighlightView$ModifyMode;->None:Lcom/android/camera/HighlightView$ModifyMode;
invoke-virtual {v5, v6}, Lcom/android/camera/HighlightView;->setMode(Lcom/android/camera/HighlightView$ModifyMode;)V
:cond_a
const/4 v5, 0x0
iput-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
goto/16 :goto_1
:pswitch_2
iget-boolean v5, v0, Lcom/android/camera/CropImage;->mWaitingToPick:Z
if-eqz v5, :cond_b
invoke-direct {p0, p1}, Lcom/android/camera/CropImageView;->recomputeFocus(Landroid/view/MotionEvent;)V
goto/16 :goto_1
:cond_b
iget-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
if-eqz v5, :cond_1
iget-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
iget v6, p0, Lcom/android/camera/CropImageView;->mMotionEdge:I
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v8
iget v9, p0, Lcom/android/camera/CropImageView;->mLastX:F
sub-float/2addr v8, v9
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v9
iget v10, p0, Lcom/android/camera/CropImageView;->mLastY:F
sub-float/2addr v9, v10
invoke-virtual {v5, v6, v8, v9}, Lcom/android/camera/HighlightView;->handleMotion(IFF)V
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v5
iput v5, p0, Lcom/android/camera/CropImageView;->mLastX:F
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v5
iput v5, p0, Lcom/android/camera/CropImageView;->mLastY:F
iget-object v5, p0, Lcom/android/camera/CropImageView;->mMotionHighlightView:Lcom/android/camera/HighlightView;
invoke-direct {p0, v5}, Lcom/android/camera/CropImageView;->ensureVisible(Lcom/android/camera/HighlightView;)V
goto/16 :goto_1
:pswitch_3
invoke-virtual {p0, v7, v7}, Lcom/android/camera/CropImageView;->center(ZZ)V
goto/16 :goto_2
:pswitch_4
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getScale()F
move-result v5
const/high16 v6, 0x3f800000 # 1.0f
cmpl-float v5, v5, v6
if-nez v5, :cond_2
invoke-virtual {p0, v7, v7}, Lcom/android/camera/CropImageView;->center(ZZ)V
goto/16 :goto_2
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_1
:pswitch_2
.end packed-switch
:pswitch_data_1
.packed-switch 0x1
:pswitch_3
:pswitch_4
.end packed-switch
.end method
.method protected postTranslate(FF)V
.locals 3
.param p1, "deltaX" # F
.param p2, "deltaY" # F
.prologue
invoke-super {p0, p1, p2}, Lcom/android/camera/ImageViewTouchBase;->postTranslate(FF)V
const/4 v1, 0x0
.local v1, "i":I
:goto_0
iget-object v2, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
if-ge v1, v2, :cond_0
iget-object v2, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/android/camera/HighlightView;
.local v0, "hv":Lcom/android/camera/HighlightView;
iget-object v2, v0, Lcom/android/camera/HighlightView;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v2, p1, p2}, Landroid/graphics/Matrix;->postTranslate(FF)Z
invoke-virtual {v0}, Lcom/android/camera/HighlightView;->invalidate()V
add-int/lit8 v1, v1, 0x1
goto :goto_0
.end local v0 # "hv":Lcom/android/camera/HighlightView;
:cond_0
return-void
.end method
.method protected zoomIn()V
.locals 4
.prologue
invoke-super {p0}, Lcom/android/camera/ImageViewTouchBase;->zoomIn()V
iget-object v1, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/android/camera/HighlightView;
.local v0, "hv":Lcom/android/camera/HighlightView;
iget-object v2, v0, Lcom/android/camera/HighlightView;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getImageMatrix()Landroid/graphics/Matrix;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/graphics/Matrix;->set(Landroid/graphics/Matrix;)V
invoke-virtual {v0}, Lcom/android/camera/HighlightView;->invalidate()V
goto :goto_0
.end local v0 # "hv":Lcom/android/camera/HighlightView;
:cond_0
return-void
.end method
.method protected zoomOut()V
.locals 4
.prologue
invoke-super {p0}, Lcom/android/camera/ImageViewTouchBase;->zoomOut()V
iget-object v1, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/android/camera/HighlightView;
.local v0, "hv":Lcom/android/camera/HighlightView;
iget-object v2, v0, Lcom/android/camera/HighlightView;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getImageMatrix()Landroid/graphics/Matrix;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/graphics/Matrix;->set(Landroid/graphics/Matrix;)V
invoke-virtual {v0}, Lcom/android/camera/HighlightView;->invalidate()V
goto :goto_0
.end local v0 # "hv":Lcom/android/camera/HighlightView;
:cond_0
return-void
.end method
.method protected zoomTo(FFF)V
.locals 4
.param p1, "scale" # F
.param p2, "centerX" # F
.param p3, "centerY" # F
.prologue
invoke-super {p0, p1, p2, p3}, Lcom/android/camera/ImageViewTouchBase;->zoomTo(FFF)V
iget-object v1, p0, Lcom/android/camera/CropImageView;->mHighlightViews:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/android/camera/HighlightView;
.local v0, "hv":Lcom/android/camera/HighlightView;
iget-object v2, v0, Lcom/android/camera/HighlightView;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {p0}, Lcom/android/camera/CropImageView;->getImageMatrix()Landroid/graphics/Matrix;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/graphics/Matrix;->set(Landroid/graphics/Matrix;)V
invoke-virtual {v0}, Lcom/android/camera/HighlightView;->invalidate()V
goto :goto_0
.end local v0 # "hv":Lcom/android/camera/HighlightView;
:cond_0
return-void
.end method