PhotoPaintView.smali

.class public Lim/tpelyyftgw/ui/components/PhotoPaintView;
.super Landroid/widget/FrameLayout;
.source "PhotoPaintView.java"

# interfaces
.implements Lim/tpelyyftgw/ui/components/paint/views/EntityView$EntityViewDelegate;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;
    }
.end annotation


# static fields
.field private static final gallery_menu_done:I


# instance fields
.field private bitmapToEdit:Landroid/graphics/Bitmap;

.field private brushes:[Lim/tpelyyftgw/ui/components/paint/Brush;

.field private cancelTextView:Landroid/widget/TextView;

.field private colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

.field private colorPickerAnimator:Landroid/animation/Animator;

.field currentBrush:I

.field private currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

.field private curtainView:Landroid/widget/FrameLayout;

.field private dimView:Landroid/widget/FrameLayout;

.field private doneTextView:Landroid/widget/TextView;

.field private editedTextPosition:Lim/tpelyyftgw/ui/components/Point;

.field private editedTextRotation:F

.field private editedTextScale:F

.field private editingText:Z

.field private entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

.field private faces:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lim/tpelyyftgw/ui/components/paint/PhotoFace;",
            ">;"
        }
    .end annotation
.end field

.field private initialText:Ljava/lang/String;

.field private orientation:I

.field private paintButton:Landroid/widget/ImageView;

.field private paintingSize:Lim/tpelyyftgw/ui/components/Size;

.field private pickingSticker:Z

.field private popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

.field private popupRect:Landroid/graphics/Rect;

.field private popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

.field private queue:Lim/tpelyyftgw/messenger/DispatchQueue;

.field private renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

.field private selectedStroke:Z

.field private selectionContainerView:Landroid/widget/FrameLayout;

.field private stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

.field private textDimView:Landroid/widget/FrameLayout;

.field private toolsView:Landroid/widget/FrameLayout;

.field private undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    const v0, 0x156e

    invoke-static {v0}, Lnp/NPFog;->d(I)I

    move-result v0

    sput v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->gallery_menu_done:I

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/graphics/Bitmap;I)V
    .registers 22
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "bitmap"    # Landroid/graphics/Bitmap;
    .param p3, "rotation"    # I

    .line 116
    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move-object/from16 v2, p2

    invoke-direct/range {p0 .. p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 69
    const/4 v3, 0x3

    new-array v3, v3, [Lim/tpelyyftgw/ui/components/paint/Brush;

    new-instance v4, Lim/tpelyyftgw/ui/components/paint/Brush$Radial;

    invoke-direct {v4}, Lim/tpelyyftgw/ui/components/paint/Brush$Radial;-><init>()V

    const/4 v5, 0x0

    aput-object v4, v3, v5

    new-instance v4, Lim/tpelyyftgw/ui/components/paint/Brush$Elliptical;

    invoke-direct {v4}, Lim/tpelyyftgw/ui/components/paint/Brush$Elliptical;-><init>()V

    const/4 v6, 0x1

    aput-object v4, v3, v6

    new-instance v4, Lim/tpelyyftgw/ui/components/paint/Brush$Neon;

    invoke-direct {v4}, Lim/tpelyyftgw/ui/components/paint/Brush$Neon;-><init>()V

    const/4 v7, 0x2

    aput-object v4, v3, v7

    iput-object v3, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->brushes:[Lim/tpelyyftgw/ui/components/paint/Brush;

    .line 106
    iput-boolean v6, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectedStroke:Z

    .line 118
    new-instance v3, Lim/tpelyyftgw/messenger/DispatchQueue;

    const-string v4, "Paint"

    invoke-direct {v3, v4}, Lim/tpelyyftgw/messenger/DispatchQueue;-><init>(Ljava/lang/String;)V

    iput-object v3, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->queue:Lim/tpelyyftgw/messenger/DispatchQueue;

    .line 120
    iput-object v2, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    .line 121
    move/from16 v3, p3

    iput v3, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->orientation:I

    .line 122
    new-instance v4, Lim/tpelyyftgw/ui/components/paint/UndoStore;

    invoke-direct {v4}, Lim/tpelyyftgw/ui/components/paint/UndoStore;-><init>()V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    .line 123
    new-instance v7, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$eFsRJKwoRq7u3ZJPWvx222ku9rQ;

    invoke-direct {v7, v0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$eFsRJKwoRq7u3ZJPWvx222ku9rQ;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v4, v7}, Lim/tpelyyftgw/ui/components/paint/UndoStore;->setDelegate(Lim/tpelyyftgw/ui/components/paint/UndoStore$UndoStoreDelegate;)V

    .line 125
    new-instance v4, Landroid/widget/FrameLayout;

    invoke-direct {v4, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->curtainView:Landroid/widget/FrameLayout;

    .line 126
    const/high16 v7, -0x1000000

    invoke-virtual {v4, v7}, Landroid/widget/FrameLayout;->setBackgroundColor(I)V

    .line 127
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->curtainView:Landroid/widget/FrameLayout;

    const/4 v8, 0x4

    invoke-virtual {v4, v8}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 128
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->curtainView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;)V

    .line 130
    new-instance v4, Lim/tpelyyftgw/ui/components/paint/RenderView;

    new-instance v9, Lim/tpelyyftgw/ui/components/paint/Painting;

    invoke-direct/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v10

    invoke-direct {v9, v10}, Lim/tpelyyftgw/ui/components/paint/Painting;-><init>(Lim/tpelyyftgw/ui/components/Size;)V

    iget v10, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->orientation:I

    invoke-direct {v4, v1, v9, v2, v10}, Lim/tpelyyftgw/ui/components/paint/RenderView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/paint/Painting;Landroid/graphics/Bitmap;I)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    .line 131
    new-instance v9, Lim/tpelyyftgw/ui/components/PhotoPaintView$1;

    invoke-direct {v9, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$1;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v4, v9}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setDelegate(Lim/tpelyyftgw/ui/components/paint/RenderView$RenderViewDelegate;)V

    .line 154
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    iget-object v9, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    invoke-virtual {v4, v9}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setUndoStore(Lim/tpelyyftgw/ui/components/paint/UndoStore;)V

    .line 155
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    iget-object v9, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->queue:Lim/tpelyyftgw/messenger/DispatchQueue;

    invoke-virtual {v4, v9}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setQueue(Lim/tpelyyftgw/messenger/DispatchQueue;)V

    .line 156
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v4, v8}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setVisibility(I)V

    .line 157
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->brushes:[Lim/tpelyyftgw/ui/components/paint/Brush;

    aget-object v8, v8, v5

    invoke-virtual {v4, v8}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setBrush(Lim/tpelyyftgw/ui/components/paint/Brush;)V

    .line 158
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    const/16 v8, 0x33

    const/4 v9, -0x1

    invoke-static {v9, v9, v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v10

    invoke-virtual {v0, v4, v10}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 160
    new-instance v4, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    new-instance v10, Lim/tpelyyftgw/ui/components/PhotoPaintView$2;

    invoke-direct {v10, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$2;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-direct {v4, v1, v10}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView$EntitiesContainerViewDelegate;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    .line 176
    const/4 v10, 0x0

    invoke-virtual {v4, v10}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->setPivotX(F)V

    .line 177
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v4, v10}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->setPivotY(F)V

    .line 178
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;)V

    .line 180
    new-instance v4, Landroid/widget/FrameLayout;

    invoke-direct {v4, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    .line 181
    invoke-virtual {v4, v10}, Landroid/widget/FrameLayout;->setAlpha(F)V

    .line 182
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    const/high16 v11, 0x66000000

    invoke-virtual {v4, v11}, Landroid/widget/FrameLayout;->setBackgroundColor(I)V

    .line 183
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    const/16 v12, 0x8

    invoke-virtual {v4, v12}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 184
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;)V

    .line 186
    new-instance v4, Landroid/widget/FrameLayout;

    invoke-direct {v4, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    .line 187
    invoke-virtual {v4, v10}, Landroid/widget/FrameLayout;->setAlpha(F)V

    .line 188
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    invoke-virtual {v4, v11}, Landroid/widget/FrameLayout;->setBackgroundColor(I)V

    .line 189
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    invoke-virtual {v4, v12}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 190
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    new-instance v10, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$c5E9L-0Uudo-hYlRLf4zIklZUdc;

    invoke-direct {v10, v0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$c5E9L-0Uudo-hYlRLf4zIklZUdc;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v4, v10}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 192
    new-instance v4, Lim/tpelyyftgw/ui/components/PhotoPaintView$3;

    invoke-direct {v4, v0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView$3;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    .line 198
    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;)V

    .line 200
    new-instance v4, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-direct {v4, v1}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    .line 201
    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;)V

    .line 202
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    new-instance v10, Lim/tpelyyftgw/ui/components/PhotoPaintView$4;

    invoke-direct {v10, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$4;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v4, v10}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->setDelegate(Lim/tpelyyftgw/ui/components/paint/views/ColorPicker$ColorPickerDelegate;)V

    .line 243
    new-instance v4, Landroid/widget/FrameLayout;

    invoke-direct {v4, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    .line 244
    invoke-virtual {v4, v7}, Landroid/widget/FrameLayout;->setBackgroundColor(I)V

    .line 245
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    const/16 v7, 0x30

    const/16 v10, 0x53

    invoke-static {v9, v7, v10}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v7

    invoke-virtual {v0, v4, v7}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 247
    new-instance v4, Landroid/widget/TextView;

    invoke-direct {v4, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    .line 248
    const/high16 v7, 0x41600000    # 14.0f

    invoke-virtual {v4, v6, v7}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 249
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    invoke-virtual {v4, v9}, Landroid/widget/TextView;->setTextColor(I)V

    .line 250
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    const/16 v10, 0x11

    invoke-virtual {v4, v10}, Landroid/widget/TextView;->setGravity(I)V

    .line 251
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    const v11, -0xc2c2c3

    invoke-static {v11, v5}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(II)Landroid/graphics/drawable/Drawable;

    move-result-object v12

    invoke-virtual {v4, v12}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 252
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    const/high16 v12, 0x41a00000    # 20.0f

    invoke-static {v12}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v13

    invoke-static {v12}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v14

    invoke-virtual {v4, v13, v5, v14, v5}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 253
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    const-string v13, "Cancel"

    const v14, 0x7f0f02f7

    invoke-static {v13, v14}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v4, v13}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 254
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    const-string v13, "fonts/rmedium.ttf"

    invoke-static {v13}, Lim/tpelyyftgw/messenger/AndroidUtilities;->getTypeface(Ljava/lang/String;)Landroid/graphics/Typeface;

    move-result-object v14

    invoke-virtual {v4, v14}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 255
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    iget-object v14, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    const/4 v15, -0x2

    invoke-static {v15, v9, v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v8

    invoke-virtual {v4, v14, v8}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 257
    new-instance v4, Landroid/widget/TextView;

    invoke-direct {v4, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    .line 258
    invoke-virtual {v4, v6, v7}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 259
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    const v6, -0xae420d

    invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V

    .line 260
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    invoke-virtual {v4, v10}, Landroid/widget/TextView;->setGravity(I)V

    .line 261
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    invoke-static {v11, v5}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(II)Landroid/graphics/drawable/Drawable;

    move-result-object v6

    invoke-virtual {v4, v6}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 262
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    invoke-static {v12}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    invoke-static {v12}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    invoke-virtual {v4, v6, v5, v7, v5}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 263
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    const-string v6, "Done"

    const v7, 0x7f0f054f

    invoke-static {v6, v7}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 264
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    invoke-static {v13}, Lim/tpelyyftgw/messenger/AndroidUtilities;->getTypeface(Ljava/lang/String;)Landroid/graphics/Typeface;

    move-result-object v6

    invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 265
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    iget-object v6, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    const/16 v7, 0x35

    invoke-static {v15, v9, v7}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v7

    invoke-virtual {v4, v6, v7}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 267
    new-instance v4, Landroid/widget/ImageView;

    invoke-direct {v4, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    .line 268
    sget-object v6, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v4, v6}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 269
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    const v6, 0x7f0802c4

    invoke-virtual {v4, v6}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 270
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    const v6, 0x40ffffff    # 7.9999995f

    invoke-static {v6}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 271
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    const/high16 v11, 0x42580000    # 54.0f

    const/high16 v12, -0x40800000    # -1.0f

    const/16 v13, 0x11

    const/4 v14, 0x0

    const/4 v15, 0x0

    const/high16 v16, 0x42600000    # 56.0f

    const/16 v17, 0x0

    invoke-static/range {v11 .. v17}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 272
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    new-instance v7, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$qecJbgznkCpzISI6af4ej2KKRHg;

    invoke-direct {v7, v0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$qecJbgznkCpzISI6af4ej2KKRHg;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 274
    new-instance v4, Landroid/widget/ImageView;

    invoke-direct {v4, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 275
    .local v4, "stickerButton":Landroid/widget/ImageView;
    sget-object v7, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 276
    const v7, 0x7f0802c8

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 277
    invoke-static {v6}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 278
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    const/16 v8, 0x36

    invoke-static {v8, v9, v10}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v8

    invoke-virtual {v7, v4, v8}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 279
    new-instance v7, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$XxDMEBhmge2sFWqyB8fh4asAzL4;

    invoke-direct {v7, v0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$XxDMEBhmge2sFWqyB8fh4asAzL4;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 281
    new-instance v7, Landroid/widget/ImageView;

    invoke-direct {v7, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 282
    .local v7, "textButton":Landroid/widget/ImageView;
    sget-object v8, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v7, v8}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 283
    const v8, 0x7f0802c6

    invoke-virtual {v7, v8}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 284
    invoke-static {v6}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v6

    invoke-virtual {v7, v6}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 285
    iget-object v6, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    const/high16 v8, 0x42580000    # 54.0f

    const/high16 v9, -0x40800000    # -1.0f

    const/high16 v11, 0x42600000    # 56.0f

    const/4 v12, 0x0

    const/4 v13, 0x0

    invoke-static/range {v8 .. v14}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v8

    invoke-virtual {v6, v7, v8}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 286
    new-instance v6, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$e-LLYCDInoKxusouPi4T5eS2YiQ;

    invoke-direct {v6, v0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$e-LLYCDInoKxusouPi4T5eS2YiQ;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v7, v6}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 288
    iget-object v6, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v6, v5}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->setUndoEnabled(Z)V

    .line 289
    iget-object v6, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v6}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->getSwatch()Lim/tpelyyftgw/ui/components/paint/Swatch;

    move-result-object v6

    invoke-direct {v0, v6, v5}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    .line 290
    invoke-direct/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->updateSettingsButton()V

    .line 291
    return-void
.end method

.method static synthetic access$000(Lim/tpelyyftgw/ui/components/PhotoPaintView;)Lim/tpelyyftgw/ui/components/paint/views/EntityView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    return-object v0
.end method

.method static synthetic access$100(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z
    .registers 3
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;
    .param p1, "x1"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 62
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    move-result v0

    return v0
.end method

.method static synthetic access$1000(Lim/tpelyyftgw/ui/components/PhotoPaintView;)Landroid/widget/FrameLayout;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    return-object v0
.end method

.method static synthetic access$1100(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->closeStickersView()V

    return-void
.end method

.method static synthetic access$1200(Lim/tpelyyftgw/ui/components/PhotoPaintView;Ljava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;)V
    .registers 3
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;
    .param p1, "x1"    # Ljava/lang/Object;
    .param p2, "x2"    # Lim/tpelyyftgw/tgnet/TLRPC$Document;

    .line 62
    invoke-direct {p0, p1, p2}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->createSticker(Ljava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;)V

    return-void
.end method

.method static synthetic access$1300(Lim/tpelyyftgw/ui/components/PhotoPaintView;)Lim/tpelyyftgw/ui/components/StickerMasksView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    return-object v0
.end method

.method static synthetic access$200(Lim/tpelyyftgw/ui/components/PhotoPaintView;)Lim/tpelyyftgw/ui/components/paint/UndoStore;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    return-object v0
.end method

.method static synthetic access$300(Lim/tpelyyftgw/ui/components/PhotoPaintView;)Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    return-object v0
.end method

.method static synthetic access$400(Lim/tpelyyftgw/ui/components/PhotoPaintView;)Landroid/widget/FrameLayout;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    return-object v0
.end method

.method static synthetic access$500(Lim/tpelyyftgw/ui/components/PhotoPaintView;Z)V
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;
    .param p1, "x1"    # Z

    .line 62
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setDimVisibility(Z)V

    return-void
.end method

.method static synthetic access$600(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V
    .registers 3
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;
    .param p1, "x1"    # Lim/tpelyyftgw/ui/components/paint/Swatch;
    .param p2, "x2"    # Z

    .line 62
    invoke-direct {p0, p1, p2}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    return-void
.end method

.method static synthetic access$700(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->mirrorSticker()V

    return-void
.end method

.method static synthetic access$800(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showTextSettings()V

    return-void
.end method

.method static synthetic access$900(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PhotoPaintView;

    .line 62
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showBrushSettings()V

    return-void
.end method

.method private baseFontSize()I
    .registers 3

    .line 820
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v0

    iget v0, v0, Lim/tpelyyftgw/ui/components/Size;->width:F

    const/high16 v1, 0x41100000    # 9.0f

    div-float/2addr v0, v1

    float-to-int v0, v0

    return v0
.end method

.method private baseStickerSize()Lim/tpelyyftgw/ui/components/Size;
    .registers 5

    .line 796
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v0

    iget v0, v0, Lim/tpelyyftgw/ui/components/Size;->width:F

    float-to-double v0, v0

    const-wide/high16 v2, 0x3fe0000000000000L    # 0.5

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v0, v0, v2

    invoke-static {v0, v1}, Ljava/lang/Math;->floor(D)D

    move-result-wide v0

    double-to-float v0, v0

    .line 797
    .local v0, "side":F
    new-instance v1, Lim/tpelyyftgw/ui/components/Size;

    invoke-direct {v1, v0, v0}, Lim/tpelyyftgw/ui/components/Size;-><init>(FF)V

    return-object v1
.end method

.method private buttonForBrush(IIZ)Landroid/widget/FrameLayout;
    .registers 13
    .param p1, "brush"    # I
    .param p2, "resource"    # I
    .param p3, "selected"    # Z

    .line 996
    new-instance v0, Landroid/widget/FrameLayout;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 997
    .local v0, "button":Landroid/widget/FrameLayout;
    const/4 v1, 0x0

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getSelectorDrawable(Z)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 998
    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$PMIdhPrYd7f078KwFWursFVNpKY;

    invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$PMIdhPrYd7f078KwFWursFVNpKY;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;I)V

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 1006
    new-instance v1, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 1007
    .local v1, "preview":Landroid/widget/ImageView;
    invoke-virtual {v1, p2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 1008
    const/high16 v2, 0x43250000    # 165.0f

    const/high16 v3, 0x42300000    # 44.0f

    const/16 v4, 0x13

    const/high16 v5, 0x42380000    # 46.0f

    const/4 v6, 0x0

    const/high16 v7, 0x41000000    # 8.0f

    const/4 v8, 0x0

    invoke-static/range {v2 .. v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 1010
    if-eqz p3, :cond_66

    .line 1011
    new-instance v2, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 1012
    .local v2, "check":Landroid/widget/ImageView;
    const v3, 0x7f080160

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 1013
    sget-object v3, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 1014
    new-instance v3, Landroid/graphics/PorterDuffColorFilter;

    const v4, -0xd07337

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v3, v4, v5}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 1015
    const/16 v3, 0x32

    const/high16 v4, -0x40800000    # -1.0f

    invoke-static {v3, v4}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v3

    invoke-virtual {v0, v2, v3}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 1018
    .end local v2    # "check":Landroid/widget/ImageView;
    :cond_66
    return-object v0
.end method

.method private buttonForText(ZLjava/lang/String;Z)Landroid/widget/FrameLayout;
    .registers 14
    .param p1, "stroke"    # Z
    .param p2, "text"    # Ljava/lang/String;
    .param p3, "selected"    # Z

    .line 1050
    new-instance v0, Lim/tpelyyftgw/ui/components/PhotoPaintView$9;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView$9;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Landroid/content/Context;)V

    .line 1056
    .local v0, "button":Landroid/widget/FrameLayout;
    const/4 v1, 0x0

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getSelectorDrawable(Z)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 1057
    new-instance v2, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$XeoqSHRvs9SgUuIF8F3RhD68iJ0;

    invoke-direct {v2, p0, p1}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$XeoqSHRvs9SgUuIF8F3RhD68iJ0;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Z)V

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 1065
    new-instance v2, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;-><init>(Landroid/content/Context;)V

    .line 1066
    .local v2, "textView":Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;
    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setBackgroundColor(I)V

    .line 1067
    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setEnabled(Z)V

    .line 1068
    const/high16 v3, 0x40400000    # 3.0f

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    int-to-float v3, v3

    invoke-virtual {v2, v3}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setStrokeWidth(F)V

    .line 1069
    const/high16 v3, -0x1000000

    if-eqz p1, :cond_38

    const/4 v4, -0x1

    goto :goto_3a

    :cond_38
    const/high16 v4, -0x1000000

    :goto_3a
    invoke-virtual {v2, v4}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setTextColor(I)V

    .line 1070
    if-eqz p1, :cond_40

    goto :goto_41

    :cond_40
    const/4 v3, 0x0

    :goto_41
    invoke-virtual {v2, v3}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setStrokeColor(I)V

    .line 1071
    const/high16 v3, 0x40000000    # 2.0f

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    invoke-virtual {v2, v4, v1, v3, v1}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setPadding(IIII)V

    .line 1072
    const/high16 v1, 0x41900000    # 18.0f

    const/4 v3, 0x1

    invoke-virtual {v2, v3, v1}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setTextSize(IF)V

    .line 1073
    const/4 v1, 0x0

    invoke-virtual {v2, v1, v3}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setTypeface(Landroid/graphics/Typeface;I)V

    .line 1074
    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setTag(Ljava/lang/Object;)V

    .line 1075
    invoke-virtual {v2, p2}, Lim/tpelyyftgw/ui/components/paint/views/EditTextOutline;->setText(Ljava/lang/CharSequence;)V

    .line 1076
    const/high16 v3, -0x40000000    # -2.0f

    const/high16 v4, -0x40000000    # -2.0f

    const/16 v5, 0x13

    const/high16 v6, 0x42380000    # 46.0f

    const/4 v7, 0x0

    const/high16 v8, 0x41800000    # 16.0f

    const/4 v9, 0x0

    invoke-static/range {v3 .. v9}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {v0, v2, v1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 1078
    if-eqz p3, :cond_a6

    .line 1079
    new-instance v1, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v1, v3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 1080
    .local v1, "check":Landroid/widget/ImageView;
    const v3, 0x7f080160

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 1081
    sget-object v3, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 1082
    new-instance v3, Landroid/graphics/PorterDuffColorFilter;

    const v4, -0xd07337

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v3, v4, v5}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 1083
    const/16 v3, 0x32

    const/high16 v4, -0x40800000    # -1.0f

    invoke-static {v3, v4}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v3

    invoke-virtual {v0, v1, v3}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 1086
    .end local v1    # "check":Landroid/widget/ImageView;
    :cond_a6
    return-object v0
.end method

.method private calculateStickerPosition(Lim/tpelyyftgw/tgnet/TLRPC$Document;)Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;
    .registers 21
    .param p1, "document"    # Lim/tpelyyftgw/tgnet/TLRPC$Document;

    .line 1226
    move-object/from16 v0, p0

    move-object/from16 v1, p1

    const/4 v2, 0x0

    .line 1228
    .local v2, "maskCoords":Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;
    const/4 v3, 0x0

    .local v3, "a":I
    :goto_6
    iget-object v4, v1, Lim/tpelyyftgw/tgnet/TLRPC$Document;->attributes:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-ge v3, v4, :cond_20

    .line 1229
    iget-object v4, v1, Lim/tpelyyftgw/tgnet/TLRPC$Document;->attributes:Ljava/util/ArrayList;

    invoke-virtual {v4, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lim/tpelyyftgw/tgnet/TLRPC$DocumentAttribute;

    .line 1230
    .local v4, "attribute":Lim/tpelyyftgw/tgnet/TLRPC$DocumentAttribute;
    instance-of v5, v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_documentAttributeSticker;

    if-eqz v5, :cond_1d

    .line 1231
    iget-object v2, v4, Lim/tpelyyftgw/tgnet/TLRPC$DocumentAttribute;->mask_coords:Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;

    .line 1232
    goto :goto_20

    .line 1228
    .end local v4    # "attribute":Lim/tpelyyftgw/tgnet/TLRPC$DocumentAttribute;
    :cond_1d
    add-int/lit8 v3, v3, 0x1

    goto :goto_6

    .line 1236
    .end local v3    # "a":I
    :cond_20
    :goto_20
    new-instance v3, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;

    invoke-direct/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->centerPositionForEntity()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v4

    const/high16 v5, 0x3f400000    # 0.75f

    const/4 v6, 0x0

    invoke-direct {v3, v0, v4, v5, v6}, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/Point;FF)V

    .line 1237
    .local v3, "defaultPosition":Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;
    if-eqz v2, :cond_e1

    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->faces:Ljava/util/ArrayList;

    if-eqz v4, :cond_e1

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-nez v4, :cond_3a

    goto/16 :goto_e1

    .line 1240
    :cond_3a
    iget v4, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;->n:I

    .line 1242
    .local v4, "anchor":I
    iget-wide v5, v1, Lim/tpelyyftgw/tgnet/TLRPC$Document;->id:J

    invoke-direct {v0, v4, v5, v6, v2}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getRandomFaceWithVacantAnchor(IJLim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;)Lim/tpelyyftgw/ui/components/paint/PhotoFace;

    move-result-object v5

    .line 1243
    .local v5, "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    if-nez v5, :cond_45

    .line 1244
    return-object v3

    .line 1247
    :cond_45
    invoke-virtual {v5, v4}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;->getPointForAnchor(I)Lim/tpelyyftgw/ui/components/Point;

    move-result-object v6

    .line 1248
    .local v6, "referencePoint":Lim/tpelyyftgw/ui/components/Point;
    invoke-virtual {v5, v4}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;->getWidthForAnchor(I)F

    move-result v7

    .line 1249
    .local v7, "referenceWidth":F
    invoke-virtual {v5}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;->getAngle()F

    move-result v8

    .line 1250
    .local v8, "angle":F
    invoke-direct/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->baseStickerSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v9

    .line 1252
    .local v9, "baseSize":Lim/tpelyyftgw/ui/components/Size;
    iget v10, v9, Lim/tpelyyftgw/ui/components/Size;->width:F

    div-float v10, v7, v10

    float-to-double v10, v10

    iget-wide v12, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;->zoom:D

    invoke-static {v10, v11}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v10, v10, v12

    double-to-float v10, v10

    .line 1254
    .local v10, "scale":F
    float-to-double v11, v8

    invoke-static {v11, v12}, Ljava/lang/Math;->toRadians(D)D

    move-result-wide v11

    double-to-float v11, v11

    .line 1255
    .local v11, "radAngle":F
    float-to-double v12, v11

    const-wide v14, 0x3ff921fb54442d18L    # 1.5707963267948966

    invoke-static {v12, v13}, Ljava/lang/Double;->isNaN(D)Z

    sub-double v12, v14, v12

    invoke-static {v12, v13}, Ljava/lang/Math;->sin(D)D

    move-result-wide v12

    float-to-double v14, v7

    invoke-static {v14, v15}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v12, v12, v14

    iget-wide v14, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;->x:D

    mul-double v12, v12, v14

    double-to-float v12, v12

    .line 1256
    .local v12, "xCompX":F
    float-to-double v13, v11

    invoke-static {v13, v14}, Ljava/lang/Double;->isNaN(D)Z

    const-wide v15, 0x3ff921fb54442d18L    # 1.5707963267948966

    sub-double v13, v15, v13

    invoke-static {v13, v14}, Ljava/lang/Math;->cos(D)D

    move-result-wide v13

    move/from16 v17, v4

    move-object/from16 v18, v5

    .end local v4    # "anchor":I
    .end local v5    # "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    .local v17, "anchor":I
    .local v18, "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    float-to-double v4, v7

    invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v13, v13, v4

    iget-wide v4, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;->x:D

    mul-double v13, v13, v4

    double-to-float v4, v13

    .line 1258
    .local v4, "xCompY":F
    float-to-double v13, v11

    invoke-static {v13, v14}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v13, v15

    invoke-static {v13, v14}, Ljava/lang/Math;->cos(D)D

    move-result-wide v13

    float-to-double v0, v7

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v13, v13, v0

    iget-wide v0, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;->y:D

    mul-double v13, v13, v0

    double-to-float v0, v13

    .line 1259
    .local v0, "yCompX":F
    float-to-double v13, v11

    invoke-static {v13, v14}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v13, v15

    invoke-static {v13, v14}, Ljava/lang/Math;->sin(D)D

    move-result-wide v13

    move v1, v8

    move-object v5, v9

    .end local v8    # "angle":F
    .end local v9    # "baseSize":Lim/tpelyyftgw/ui/components/Size;
    .local v1, "angle":F
    .local v5, "baseSize":Lim/tpelyyftgw/ui/components/Size;
    float-to-double v8, v7

    invoke-static {v8, v9}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v13, v13, v8

    iget-wide v8, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;->y:D

    mul-double v13, v13, v8

    double-to-float v8, v13

    .line 1261
    .local v8, "yCompY":F
    iget v9, v6, Lim/tpelyyftgw/ui/components/Point;->x:F

    add-float/2addr v9, v12

    add-float/2addr v9, v0

    .line 1262
    .local v9, "x":F
    iget v13, v6, Lim/tpelyyftgw/ui/components/Point;->y:F

    add-float/2addr v13, v4

    add-float/2addr v13, v8

    .line 1264
    .local v13, "y":F
    new-instance v14, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;

    new-instance v15, Lim/tpelyyftgw/ui/components/Point;

    invoke-direct {v15, v9, v13}, Lim/tpelyyftgw/ui/components/Point;-><init>(FF)V

    move/from16 v16, v0

    move-object/from16 v0, p0

    .end local v0    # "yCompX":F
    .local v16, "yCompX":F
    invoke-direct {v14, v0, v15, v10, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/Point;FF)V

    return-object v14

    .line 1238
    .end local v1    # "angle":F
    .end local v4    # "xCompY":F
    .end local v5    # "baseSize":Lim/tpelyyftgw/ui/components/Size;
    .end local v6    # "referencePoint":Lim/tpelyyftgw/ui/components/Point;
    .end local v7    # "referenceWidth":F
    .end local v8    # "yCompY":F
    .end local v9    # "x":F
    .end local v10    # "scale":F
    .end local v11    # "radAngle":F
    .end local v12    # "xCompX":F
    .end local v13    # "y":F
    .end local v16    # "yCompX":F
    .end local v17    # "anchor":I
    .end local v18    # "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    :cond_e1
    :goto_e1
    return-object v3
.end method

.method private centerPositionForEntity()Lim/tpelyyftgw/ui/components/Point;
    .registers 6

    .line 617
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v0

    .line 618
    .local v0, "paintingSize":Lim/tpelyyftgw/ui/components/Size;
    new-instance v1, Lim/tpelyyftgw/ui/components/Point;

    iget v2, v0, Lim/tpelyyftgw/ui/components/Size;->width:F

    const/high16 v3, 0x40000000    # 2.0f

    div-float/2addr v2, v3

    iget v4, v0, Lim/tpelyyftgw/ui/components/Size;->height:F

    div-float/2addr v4, v3

    invoke-direct {v1, v2, v4}, Lim/tpelyyftgw/ui/components/Point;-><init>(FF)V

    return-object v1
.end method

.method private closeStickersView()V
    .registers 4

    .line 779
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    if-eqz v0, :cond_2d

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getVisibility()I

    move-result v0

    if-eqz v0, :cond_b

    goto :goto_2d

    .line 782
    :cond_b
    const/4 v0, 0x0

    iput-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->pickingSticker:Z

    .line 784
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    const/4 v1, 0x2

    new-array v1, v1, [F

    fill-array-data v1, :array_2e

    const-string v2, "alpha"

    invoke-static {v0, v2, v1}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 785
    .local v0, "a":Landroid/animation/Animator;
    const-wide/16 v1, 0xc8

    invoke-virtual {v0, v1, v2}, Landroid/animation/Animator;->setDuration(J)Landroid/animation/Animator;

    .line 786
    new-instance v1, Lim/tpelyyftgw/ui/components/PhotoPaintView$8;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$8;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v0, v1}, Landroid/animation/Animator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 792
    invoke-virtual {v0}, Landroid/animation/Animator;->start()V

    .line 793
    return-void

    .line 780
    .end local v0    # "a":Landroid/animation/Animator;
    :cond_2d
    :goto_2d
    return-void

    :array_2e
    .array-data 4
        0x3f800000    # 1.0f
        0x0
    .end array-data
.end method

.method private createSticker(Ljava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;)V
    .registers 13
    .param p1, "parentObject"    # Ljava/lang/Object;
    .param p2, "sticker"    # Lim/tpelyyftgw/tgnet/TLRPC$Document;

    .line 805
    invoke-direct {p0, p2}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->calculateStickerPosition(Lim/tpelyyftgw/tgnet/TLRPC$Document;)Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;

    move-result-object v0

    .line 806
    .local v0, "position":Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;
    new-instance v9, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;->access$1400(Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;)Lim/tpelyyftgw/ui/components/Point;

    move-result-object v3

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;->access$1500(Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;)F

    move-result v4

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;->access$1600(Lim/tpelyyftgw/ui/components/PhotoPaintView$StickerPosition;)F

    move-result v5

    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->baseStickerSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v6

    move-object v1, v9

    move-object v7, p2

    move-object v8, p1

    invoke-direct/range {v1 .. v8}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/Point;FFLim/tpelyyftgw/ui/components/Size;Lim/tpelyyftgw/tgnet/TLRPC$Document;Ljava/lang/Object;)V

    .line 807
    .local v1, "view":Lim/tpelyyftgw/ui/components/paint/views/StickerView;
    invoke-virtual {v1, p0}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->setDelegate(Lim/tpelyyftgw/ui/components/paint/views/EntityView$EntityViewDelegate;)V

    .line 808
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->addView(Landroid/view/View;)V

    .line 809
    invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->registerRemovalUndo(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 810
    invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    .line 811
    return-void
.end method

.method private createText()V
    .registers 13

    .line 824
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->getSwatch()Lim/tpelyyftgw/ui/components/paint/Swatch;

    move-result-object v0

    .line 825
    .local v0, "currentSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    new-instance v1, Lim/tpelyyftgw/ui/components/paint/Swatch;

    iget v2, v0, Lim/tpelyyftgw/ui/components/paint/Swatch;->brushWeight:F

    const/4 v3, -0x1

    const/high16 v4, 0x3f800000    # 1.0f

    invoke-direct {v1, v3, v4, v2}, Lim/tpelyyftgw/ui/components/paint/Swatch;-><init>(IFF)V

    .line 826
    .local v1, "whiteSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    new-instance v2, Lim/tpelyyftgw/ui/components/paint/Swatch;

    iget v3, v0, Lim/tpelyyftgw/ui/components/paint/Swatch;->brushWeight:F

    const/high16 v4, -0x1000000

    const v5, 0x3f59999a    # 0.85f

    invoke-direct {v2, v4, v5, v3}, Lim/tpelyyftgw/ui/components/paint/Swatch;-><init>(IFF)V

    .line 827
    .local v2, "blackSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    iget-boolean v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectedStroke:Z

    if-eqz v3, :cond_22

    move-object v3, v2

    goto :goto_23

    :cond_22
    move-object v3, v1

    :goto_23
    const/4 v4, 0x1

    invoke-direct {p0, v3, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    .line 829
    new-instance v3, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v6

    const/4 v4, 0x0

    invoke-direct {p0, v4}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->startPositionRelativeToEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Lim/tpelyyftgw/ui/components/Point;

    move-result-object v7

    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->baseFontSize()I

    move-result v8

    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->getSwatch()Lim/tpelyyftgw/ui/components/paint/Swatch;

    move-result-object v10

    iget-boolean v11, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectedStroke:Z

    const-string v9, ""

    move-object v5, v3

    invoke-direct/range {v5 .. v11}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/Point;ILjava/lang/String;Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    .line 830
    .local v3, "view":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    invoke-virtual {v3, p0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setDelegate(Lim/tpelyyftgw/ui/components/paint/views/EntityView$EntityViewDelegate;)V

    .line 831
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v4

    iget v4, v4, Lim/tpelyyftgw/ui/components/Size;->width:F

    const/high16 v5, 0x41a00000    # 20.0f

    sub-float/2addr v4, v5

    float-to-int v4, v4

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setMaxWidth(I)V

    .line 832
    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    const/4 v5, -0x2

    const/high16 v6, -0x40000000    # -2.0f

    invoke-static {v5, v6}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v5

    invoke-virtual {v4, v3, v5}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 834
    invoke-direct {p0, v3}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->registerRemovalUndo(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 835
    invoke-direct {p0, v3}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    .line 836
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editSelectedTextEntity()V

    .line 837
    return-void
.end method

.method private detectFaces()V
    .registers 3

    .line 1182
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->queue:Lim/tpelyyftgw/messenger/DispatchQueue;

    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$c2s_GF8mzvMI2vv8SDtaRM0S--Y;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$c2s_GF8mzvMI2vv8SDtaRM0S--Y;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/messenger/DispatchQueue;->postRunnable(Ljava/lang/Runnable;)V

    .line 1223
    return-void
.end method

.method private duplicateSelectedEntity()V
    .registers 7

    .line 724
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    if-nez v0, :cond_5

    .line 725
    return-void

    .line 727
    :cond_5
    const/4 v1, 0x0

    .line 728
    .local v1, "entityView":Lim/tpelyyftgw/ui/components/paint/views/EntityView;
    invoke-direct {p0, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->startPositionRelativeToEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Lim/tpelyyftgw/ui/components/Point;

    move-result-object v0

    .line 730
    .local v0, "position":Lim/tpelyyftgw/ui/components/Point;
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v3, v2, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    if-eqz v3, :cond_27

    .line 731
    new-instance v2, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    check-cast v4, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    invoke-direct {v2, v3, v4, v0}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/paint/views/StickerView;Lim/tpelyyftgw/ui/components/Point;)V

    .line 732
    .local v2, "newStickerView":Lim/tpelyyftgw/ui/components/paint/views/StickerView;
    invoke-virtual {v2, p0}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->setDelegate(Lim/tpelyyftgw/ui/components/paint/views/EntityView$EntityViewDelegate;)V

    .line 733
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v3, v2}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->addView(Landroid/view/View;)V

    .line 734
    move-object v1, v2

    .end local v2    # "newStickerView":Lim/tpelyyftgw/ui/components/paint/views/StickerView;
    goto :goto_56

    .line 735
    :cond_27
    instance-of v2, v2, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v2, :cond_56

    .line 736
    new-instance v2, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    check-cast v4, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    invoke-direct {v2, v3, v4, v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;Lim/tpelyyftgw/ui/components/Point;)V

    .line 737
    .local v2, "newTextPaintView":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    invoke-virtual {v2, p0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setDelegate(Lim/tpelyyftgw/ui/components/paint/views/EntityView$EntityViewDelegate;)V

    .line 738
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v3

    iget v3, v3, Lim/tpelyyftgw/ui/components/Size;->width:F

    const/high16 v4, 0x41a00000    # 20.0f

    sub-float/2addr v3, v4

    float-to-int v3, v3

    invoke-virtual {v2, v3}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setMaxWidth(I)V

    .line 739
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    const/4 v4, -0x2

    const/high16 v5, -0x40000000    # -2.0f

    invoke-static {v4, v5}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v4

    invoke-virtual {v3, v2, v4}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 740
    move-object v1, v2

    goto :goto_57

    .line 735
    .end local v2    # "newTextPaintView":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    :cond_56
    :goto_56
    nop

    .line 743
    :goto_57
    invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->registerRemovalUndo(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 744
    invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    .line 746
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->updateSettingsButton()V

    .line 747
    return-void
.end method

.method private editSelectedTextEntity()V
    .registers 6

    .line 840
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v0, v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v0, :cond_64

    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    if-eqz v0, :cond_b

    goto :goto_64

    .line 844
    :cond_b
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->curtainView:Landroid/widget/FrameLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 846
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    check-cast v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    .line 847
    .local v0, "textPaintView":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getText()Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->initialText:Ljava/lang/String;

    .line 848
    const/4 v2, 0x1

    iput-boolean v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    .line 850
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v3

    iput-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextPosition:Lim/tpelyyftgw/ui/components/Point;

    .line 851
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getRotation()F

    move-result v3

    iput v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextRotation:F

    .line 852
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getScale()F

    move-result v3

    iput v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextScale:F

    .line 854
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->centerPositionForEntity()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v3

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setPosition(Lim/tpelyyftgw/ui/components/Point;)V

    .line 855
    const/4 v3, 0x0

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setRotation(F)V

    .line 856
    const/high16 v3, 0x3f800000    # 1.0f

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setScale(F)V

    .line 858
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    const/16 v4, 0x8

    invoke-virtual {v3, v4}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 860
    invoke-direct {p0, v2, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setTextDimVisibility(ZLim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 861
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->beginEditing()V

    .line 863
    sget-object v2, Lim/tpelyyftgw/messenger/ApplicationLoader;->applicationContext:Landroid/content/Context;

    const-string v3, "input_method"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/view/inputmethod/InputMethodManager;

    .line 864
    .local v2, "inputMethodManager":Landroid/view/inputmethod/InputMethodManager;
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getFocusedView()Landroid/view/View;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/View;->getWindowToken()Landroid/os/IBinder;

    move-result-object v3

    const/4 v4, 0x2

    invoke-virtual {v2, v3, v4, v1}, Landroid/view/inputmethod/InputMethodManager;->toggleSoftInputFromWindow(Landroid/os/IBinder;II)V

    .line 865
    return-void

    .line 841
    .end local v0    # "textPaintView":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    .end local v2    # "inputMethodManager":Landroid/view/inputmethod/InputMethodManager;
    :cond_64
    :goto_64
    return-void
.end method

.method private getFrameRotation()I
    .registers 3

    .line 1162
    iget v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->orientation:I

    const/16 v1, 0x5a

    if-eq v0, v1, :cond_14

    const/16 v1, 0xb4

    if-eq v0, v1, :cond_12

    const/16 v1, 0x10e

    if-eq v0, v1, :cond_10

    .line 1176
    const/4 v0, 0x0

    return v0

    .line 1172
    :cond_10
    const/4 v0, 0x3

    return v0

    .line 1168
    :cond_12
    const/4 v0, 0x2

    return v0

    .line 1164
    :cond_14
    const/4 v0, 0x1

    return v0
.end method

.method private getPaintingSize()Lim/tpelyyftgw/ui/components/Size;
    .registers 7

    .line 307
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintingSize:Lim/tpelyyftgw/ui/components/Size;

    if-eqz v0, :cond_5

    .line 308
    return-object v0

    .line 310
    :cond_5
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v0

    if-eqz v0, :cond_12

    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    goto :goto_18

    :cond_12
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    :goto_18
    int-to-float v0, v0

    .line 311
    .local v0, "width":F
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v1

    if-eqz v1, :cond_26

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    goto :goto_2c

    :cond_26
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    :goto_2c
    int-to-float v1, v1

    .line 313
    .local v1, "height":F
    new-instance v2, Lim/tpelyyftgw/ui/components/Size;

    invoke-direct {v2, v0, v1}, Lim/tpelyyftgw/ui/components/Size;-><init>(FF)V

    .line 314
    .local v2, "size":Lim/tpelyyftgw/ui/components/Size;
    const/high16 v3, 0x44a00000    # 1280.0f

    iput v3, v2, Lim/tpelyyftgw/ui/components/Size;->width:F

    .line 315
    iget v4, v2, Lim/tpelyyftgw/ui/components/Size;->width:F

    mul-float v4, v4, v1

    div-float/2addr v4, v0

    float-to-double v4, v4

    invoke-static {v4, v5}, Ljava/lang/Math;->floor(D)D

    move-result-wide v4

    double-to-float v4, v4

    iput v4, v2, Lim/tpelyyftgw/ui/components/Size;->height:F

    .line 316
    iget v4, v2, Lim/tpelyyftgw/ui/components/Size;->height:F

    cmpl-float v4, v4, v3

    if-lez v4, :cond_58

    .line 317
    iput v3, v2, Lim/tpelyyftgw/ui/components/Size;->height:F

    .line 318
    iget v3, v2, Lim/tpelyyftgw/ui/components/Size;->height:F

    mul-float v3, v3, v0

    div-float/2addr v3, v1

    float-to-double v3, v3

    invoke-static {v3, v4}, Ljava/lang/Math;->floor(D)D

    move-result-wide v3

    double-to-float v3, v3

    iput v3, v2, Lim/tpelyyftgw/ui/components/Size;->width:F

    .line 320
    :cond_58
    iput-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintingSize:Lim/tpelyyftgw/ui/components/Size;

    .line 321
    return-object v2
.end method

.method private getRandomFaceWithVacantAnchor(IJLim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;)Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    .registers 19
    .param p1, "anchor"    # I
    .param p2, "documentId"    # J
    .param p4, "maskCoords"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;

    .line 1269
    move-object v6, p0

    move v7, p1

    if-ltz v7, :cond_42

    const/4 v0, 0x3

    if-gt v7, v0, :cond_42

    iget-object v0, v6, Lim/tpelyyftgw/ui/components/PhotoPaintView;->faces:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_10

    goto :goto_42

    .line 1273
    :cond_10
    iget-object v0, v6, Lim/tpelyyftgw/ui/components/PhotoPaintView;->faces:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v8

    .line 1274
    .local v8, "count":I
    sget-object v0, Lim/tpelyyftgw/messenger/Utilities;->random:Ljava/security/SecureRandom;

    invoke-virtual {v0, v8}, Ljava/security/SecureRandom;->nextInt(I)I

    move-result v9

    .line 1275
    .local v9, "randomIndex":I
    move v0, v8

    .line 1277
    .local v0, "remaining":I
    const/4 v10, 0x0

    .line 1278
    .local v10, "selectedFace":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    move v1, v9

    move v11, v0

    move v12, v1

    .end local v0    # "remaining":I
    .local v11, "remaining":I
    .local v12, "i":I
    :goto_21
    if-lez v11, :cond_41

    .line 1279
    iget-object v0, v6, Lim/tpelyyftgw/ui/components/PhotoPaintView;->faces:Ljava/util/ArrayList;

    invoke-virtual {v0, v12}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    move-object v13, v0

    check-cast v13, Lim/tpelyyftgw/ui/components/paint/PhotoFace;

    .line 1280
    .local v13, "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    move-object v0, p0

    move-object v1, v13

    move v2, p1

    move-wide/from16 v3, p2

    move-object/from16 v5, p4

    invoke-direct/range {v0 .. v5}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isFaceAnchorOccupied(Lim/tpelyyftgw/ui/components/paint/PhotoFace;IJLim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;)Z

    move-result v0

    if-nez v0, :cond_3a

    .line 1281
    return-object v13

    .line 1278
    .end local v13    # "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    :cond_3a
    add-int/lit8 v0, v12, 0x1

    rem-int v12, v0, v8

    add-int/lit8 v11, v11, -0x1

    goto :goto_21

    .line 1285
    .end local v12    # "i":I
    :cond_41
    return-object v10

    .line 1270
    .end local v8    # "count":I
    .end local v9    # "randomIndex":I
    .end local v10    # "selectedFace":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    .end local v11    # "remaining":I
    :cond_42
    :goto_42
    const/4 v0, 0x0

    return-object v0
.end method

.method private hasChanges()Z
    .registers 2

    .line 381
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/UndoStore;->canUndo()Z

    move-result v0

    if-nez v0, :cond_13

    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->entitiesCount()I

    move-result v0

    if-lez v0, :cond_11

    goto :goto_13

    :cond_11
    const/4 v0, 0x0

    goto :goto_14

    :cond_13
    :goto_13
    const/4 v0, 0x1

    :goto_14
    return v0
.end method

.method private isFaceAnchorOccupied(Lim/tpelyyftgw/ui/components/paint/PhotoFace;IJLim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;)Z
    .registers 21
    .param p1, "face"    # Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    .param p2, "anchor"    # I
    .param p3, "documentId"    # J
    .param p5, "maskCoords"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_maskCoords;

    .line 1289
    move-object v0, p0

    invoke-virtual/range {p1 .. p2}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;->getPointForAnchor(I)Lim/tpelyyftgw/ui/components/Point;

    move-result-object v1

    .line 1290
    .local v1, "anchorPoint":Lim/tpelyyftgw/ui/components/Point;
    const/4 v2, 0x1

    if-nez v1, :cond_9

    .line 1291
    return v2

    .line 1294
    :cond_9
    const/4 v3, 0x0

    move-object/from16 v4, p1

    invoke-virtual {v4, v3}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;->getWidthForAnchor(I)F

    move-result v5

    const v6, 0x3f8ccccd    # 1.1f

    mul-float v5, v5, v6

    .line 1296
    .local v5, "minDistance":F
    const/4 v6, 0x0

    .local v6, "index":I
    :goto_16
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v7}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildCount()I

    move-result v7

    if-ge v6, v7, :cond_66

    .line 1297
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v7, v6}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildAt(I)Landroid/view/View;

    move-result-object v7

    .line 1298
    .local v7, "view":Landroid/view/View;
    instance-of v8, v7, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    if-nez v8, :cond_2b

    .line 1299
    move/from16 v10, p2

    goto :goto_63

    .line 1302
    :cond_2b
    move-object v8, v7

    check-cast v8, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    .line 1303
    .local v8, "stickerView":Lim/tpelyyftgw/ui/components/paint/views/StickerView;
    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->getAnchor()I

    move-result v9

    move/from16 v10, p2

    if-eq v9, v10, :cond_37

    .line 1304
    goto :goto_63

    .line 1307
    :cond_37
    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v9

    .line 1308
    .local v9, "location":Lim/tpelyyftgw/ui/components/Point;
    iget v11, v9, Lim/tpelyyftgw/ui/components/Point;->x:F

    iget v12, v1, Lim/tpelyyftgw/ui/components/Point;->x:F

    sub-float/2addr v11, v12

    float-to-double v11, v11

    iget v13, v9, Lim/tpelyyftgw/ui/components/Point;->y:F

    iget v14, v1, Lim/tpelyyftgw/ui/components/Point;->y:F

    sub-float/2addr v13, v14

    float-to-double v13, v13

    invoke-static {v11, v12, v13, v14}, Ljava/lang/Math;->hypot(DD)D

    move-result-wide v11

    double-to-float v11, v11

    .line 1309
    .local v11, "distance":F
    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->getSticker()Lim/tpelyyftgw/tgnet/TLRPC$Document;

    move-result-object v12

    iget-wide v12, v12, Lim/tpelyyftgw/tgnet/TLRPC$Document;->id:J

    cmp-long v14, p3, v12

    if-eqz v14, :cond_5e

    iget-object v12, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->faces:Ljava/util/ArrayList;

    invoke-virtual {v12}, Ljava/util/ArrayList;->size()I

    move-result v12

    if-le v12, v2, :cond_63

    :cond_5e
    cmpg-float v12, v11, v5

    if-gez v12, :cond_63

    .line 1310
    return v2

    .line 1296
    .end local v7    # "view":Landroid/view/View;
    .end local v8    # "stickerView":Lim/tpelyyftgw/ui/components/paint/views/StickerView;
    .end local v9    # "location":Lim/tpelyyftgw/ui/components/Point;
    .end local v11    # "distance":F
    :cond_63
    :goto_63
    add-int/lit8 v6, v6, 0x1

    goto :goto_16

    :cond_66
    move/from16 v10, p2

    .line 1314
    .end local v6    # "index":I
    return v3
.end method

.method private isSidewardOrientation()Z
    .registers 4

    .line 325
    iget v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->orientation:I

    rem-int/lit16 v1, v0, 0x168

    const/16 v2, 0x5a

    if-eq v1, v2, :cond_11

    rem-int/lit16 v0, v0, 0x168

    const/16 v1, 0x10e

    if-ne v0, v1, :cond_f

    goto :goto_11

    :cond_f
    const/4 v0, 0x0

    goto :goto_12

    :cond_11
    :goto_11
    const/4 v0, 0x1

    :goto_12
    return v0
.end method

.method static synthetic lambda$maybeShowDismissalAlert$6(Ljava/lang/Runnable;Landroid/content/DialogInterface;I)V
    .registers 3
    .param p0, "okRunnable"    # Ljava/lang/Runnable;
    .param p1, "dialogInterface"    # Landroid/content/DialogInterface;
    .param p2, "i"    # I

    .line 437
    invoke-interface {p0}, Ljava/lang/Runnable;->run()V

    return-void
.end method

.method static synthetic lambda$shutdown$5()V
    .registers 1

    .line 357
    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v0

    .line 358
    .local v0, "looper":Landroid/os/Looper;
    if-eqz v0, :cond_9

    .line 359
    invoke-virtual {v0}, Landroid/os/Looper;->quit()V

    .line 361
    :cond_9
    return-void
.end method

.method private mirrorSticker()V
    .registers 3

    .line 814
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v1, v0, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    if-eqz v1, :cond_b

    .line 815
    check-cast v0, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->mirror()V

    .line 817
    :cond_b
    return-void
.end method

.method private openStickersView()V
    .registers 4

    .line 750
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    if-eqz v0, :cond_b

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getVisibility()I

    move-result v0

    if-nez v0, :cond_b

    .line 751
    return-void

    .line 753
    :cond_b
    const/4 v0, 0x1

    iput-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->pickingSticker:Z

    .line 755
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    if-nez v0, :cond_31

    .line 756
    new-instance v0, Lim/tpelyyftgw/ui/components/StickerMasksView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 757
    new-instance v1, Lim/tpelyyftgw/ui/components/PhotoPaintView$7;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView$7;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView;->setListener(Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;)V

    .line 769
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    const/16 v1, 0x33

    const/4 v2, -0x1

    invoke-static {v2, v2, v1}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 772
    :cond_31
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView;->setVisibility(I)V

    .line 773
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    const/4 v1, 0x2

    new-array v1, v1, [F

    fill-array-data v1, :array_4e

    const-string v2, "alpha"

    invoke-static {v0, v2, v1}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 774
    .local v0, "a":Landroid/animation/Animator;
    const-wide/16 v1, 0xc8

    invoke-virtual {v0, v1, v2}, Landroid/animation/Animator;->setDuration(J)Landroid/animation/Animator;

    .line 775
    invoke-virtual {v0}, Landroid/animation/Animator;->start()V

    .line 776
    return-void

    :array_4e
    .array-data 4
        0x0
        0x3f800000    # 1.0f
    .end array-data
.end method

.method private registerRemovalUndo(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V
    .registers 5
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 801
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getUUID()Ljava/util/UUID;

    move-result-object v1

    new-instance v2, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$MRwctJvS8tR7pBGpDtzByJjH7QY;

    invoke-direct {v2, p0, p1}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$MRwctJvS8tR7pBGpDtzByJjH7QY;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/components/paint/UndoStore;->registerUndo(Ljava/util/UUID;Ljava/lang/Runnable;)V

    .line 802
    return-void
.end method

.method private removeEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V
    .registers 4
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 711
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    if-ne p1, v0, :cond_15

    .line 712
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->deselect()V

    .line 713
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    if-eqz v0, :cond_f

    .line 714
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->closeTextEnter(Z)V

    .line 716
    :cond_f
    const/4 v0, 0x0

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 717
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->updateSettingsButton()V

    .line 719
    :cond_15
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->removeView(Landroid/view/View;)V

    .line 720
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getUUID()Ljava/util/UUID;

    move-result-object v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/UndoStore;->unregisterUndo(Ljava/util/UUID;)V

    .line 721
    return-void
.end method

.method private selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z
    .registers 6
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 679
    const/4 v0, 0x0

    .line 681
    .local v0, "changed":Z
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    const/4 v2, 0x1

    if-eqz v1, :cond_14

    .line 682
    if-ne v1, p1, :cond_10

    .line 683
    iget-boolean v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    if-nez v3, :cond_f

    .line 684
    invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showMenuForEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 685
    :cond_f
    return v2

    .line 687
    :cond_10
    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->deselect()V

    .line 689
    const/4 v0, 0x1

    .line 692
    :cond_14
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 694
    if-eqz p1, :cond_34

    .line 695
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-virtual {p1, v1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->select(Landroid/view/ViewGroup;)V

    .line 696
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    invoke-virtual {v1, v3}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->bringViewToFront(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 698
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v3, v1, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v3, :cond_33

    .line 699
    check-cast v1, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getSwatch()Lim/tpelyyftgw/ui/components/paint/Swatch;

    move-result-object v1

    invoke-direct {p0, v1, v2}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    .line 702
    :cond_33
    const/4 v0, 0x1

    .line 705
    :cond_34
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->updateSettingsButton()V

    .line 707
    return v0
.end method

.method private setBrush(I)V
    .registers 4
    .param p1, "brush"    # I

    .line 907
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->brushes:[Lim/tpelyyftgw/ui/components/paint/Brush;

    iput p1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentBrush:I

    aget-object v1, v1, p1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setBrush(Lim/tpelyyftgw/ui/components/paint/Brush;)V

    .line 908
    return-void
.end method

.method private setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V
    .registers 5
    .param p1, "swatch"    # Lim/tpelyyftgw/ui/components/paint/Swatch;
    .param p2, "updateInterface"    # Z

    .line 446
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    iget v1, p1, Lim/tpelyyftgw/ui/components/paint/Swatch;->color:I

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setColor(I)V

    .line 447
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    iget v1, p1, Lim/tpelyyftgw/ui/components/paint/Swatch;->brushWeight:F

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setBrushSize(F)V

    .line 449
    if-eqz p2, :cond_15

    .line 450
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->setSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;)V

    .line 453
    :cond_15
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v1, v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v1, :cond_20

    .line 454
    check-cast v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;)V

    .line 456
    :cond_20
    return-void
.end method

.method private setDimVisibility(Z)V
    .registers 6
    .param p1, "visible"    # Z

    .line 460
    const/4 v0, 0x2

    const-string v1, "alpha"

    if-eqz p1, :cond_17

    .line 461
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 462
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    new-array v0, v0, [F

    fill-array-data v0, :array_34

    invoke-static {v2, v1, v0}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .local v0, "animator":Landroid/animation/Animator;
    goto :goto_22

    .line 464
    .end local v0    # "animator":Landroid/animation/Animator;
    :cond_17
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    new-array v0, v0, [F

    fill-array-data v0, :array_3c

    invoke-static {v2, v1, v0}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 466
    .restart local v0    # "animator":Landroid/animation/Animator;
    :goto_22
    new-instance v1, Lim/tpelyyftgw/ui/components/PhotoPaintView$5;

    invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView$5;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Z)V

    invoke-virtual {v0, v1}, Landroid/animation/Animator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 474
    const-wide/16 v1, 0xc8

    invoke-virtual {v0, v1, v2}, Landroid/animation/Animator;->setDuration(J)Landroid/animation/Animator;

    .line 475
    invoke-virtual {v0}, Landroid/animation/Animator;->start()V

    .line 476
    return-void

    nop

    :array_34
    .array-data 4
        0x0
        0x3f800000    # 1.0f
    .end array-data

    :array_3c
    .array-data 4
        0x3f800000    # 1.0f
        0x0
    .end array-data
.end method

.method private setStroke(Z)V
    .registers 8
    .param p1, "stroke"    # Z

    .line 911
    iput-boolean p1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectedStroke:Z

    .line 912
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v0, v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v0, :cond_42

    .line 913
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->getSwatch()Lim/tpelyyftgw/ui/components/paint/Swatch;

    move-result-object v0

    .line 914
    .local v0, "currentSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    const/4 v1, 0x1

    const/high16 v2, -0x1000000

    const/4 v3, -0x1

    if-eqz p1, :cond_27

    iget v4, v0, Lim/tpelyyftgw/ui/components/paint/Swatch;->color:I

    if-ne v4, v3, :cond_27

    .line 915
    new-instance v3, Lim/tpelyyftgw/ui/components/paint/Swatch;

    const v4, 0x3f59999a    # 0.85f

    iget v5, v0, Lim/tpelyyftgw/ui/components/paint/Swatch;->brushWeight:F

    invoke-direct {v3, v2, v4, v5}, Lim/tpelyyftgw/ui/components/paint/Swatch;-><init>(IFF)V

    move-object v2, v3

    .line 916
    .local v2, "blackSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    invoke-direct {p0, v2, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    .end local v2    # "blackSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    goto :goto_3a

    .line 917
    :cond_27
    if-nez p1, :cond_3a

    iget v4, v0, Lim/tpelyyftgw/ui/components/paint/Swatch;->color:I

    if-ne v4, v2, :cond_3a

    .line 918
    new-instance v2, Lim/tpelyyftgw/ui/components/paint/Swatch;

    const/high16 v4, 0x3f800000    # 1.0f

    iget v5, v0, Lim/tpelyyftgw/ui/components/paint/Swatch;->brushWeight:F

    invoke-direct {v2, v3, v4, v5}, Lim/tpelyyftgw/ui/components/paint/Swatch;-><init>(IFF)V

    .line 919
    .restart local v2    # "blackSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    invoke-direct {p0, v2, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setCurrentSwatch(Lim/tpelyyftgw/ui/components/paint/Swatch;Z)V

    goto :goto_3b

    .line 917
    .end local v2    # "blackSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    :cond_3a
    :goto_3a
    nop

    .line 921
    :goto_3b
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    check-cast v1, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    invoke-virtual {v1, p1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setStroke(Z)V

    .line 923
    .end local v0    # "currentSwatch":Lim/tpelyyftgw/ui/components/paint/Swatch;
    :cond_42
    return-void
.end method

.method private setTextDimVisibility(ZLim/tpelyyftgw/ui/components/paint/views/EntityView;)V
    .registers 7
    .param p1, "visible"    # Z
    .param p2, "view"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 481
    if-eqz p1, :cond_28

    if-eqz p2, :cond_28

    .line 482
    invoke-virtual {p2}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    .line 483
    .local v0, "parent":Landroid/view/ViewGroup;
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    invoke-virtual {v1}, Landroid/widget/FrameLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    if-eqz v1, :cond_1f

    .line 484
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    invoke-virtual {v1}, Landroid/widget/FrameLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    check-cast v1, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    invoke-virtual {v1, v2}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->removeView(Landroid/view/View;)V

    .line 486
    :cond_1f
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, p2}, Landroid/view/ViewGroup;->indexOfChild(Landroid/view/View;)I

    move-result v2

    invoke-virtual {v0, v1, v2}, Landroid/view/ViewGroup;->addView(Landroid/view/View;I)V

    .line 489
    .end local v0    # "parent":Landroid/view/ViewGroup;
    :cond_28
    xor-int/lit8 v0, p1, 0x1

    invoke-virtual {p2, v0}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->setSelectionVisibility(Z)V

    .line 491
    const/4 v0, 0x2

    const-string v1, "alpha"

    if-eqz p1, :cond_44

    .line 492
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 493
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    new-array v0, v0, [F

    fill-array-data v0, :array_60

    invoke-static {v2, v1, v0}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .local v0, "animator":Landroid/animation/Animator;
    goto :goto_4f

    .line 495
    .end local v0    # "animator":Landroid/animation/Animator;
    :cond_44
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->textDimView:Landroid/widget/FrameLayout;

    new-array v0, v0, [F

    fill-array-data v0, :array_68

    invoke-static {v2, v1, v0}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 497
    .restart local v0    # "animator":Landroid/animation/Animator;
    :goto_4f
    new-instance v1, Lim/tpelyyftgw/ui/components/PhotoPaintView$6;

    invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView$6;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Z)V

    invoke-virtual {v0, v1}, Landroid/animation/Animator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 508
    const-wide/16 v1, 0xc8

    invoke-virtual {v0, v1, v2}, Landroid/animation/Animator;->setDuration(J)Landroid/animation/Animator;

    .line 509
    invoke-virtual {v0}, Landroid/animation/Animator;->start()V

    .line 510
    return-void

    :array_60
    .array-data 4
        0x0
        0x3f800000    # 1.0f
    .end array-data

    :array_68
    .array-data 4
        0x3f800000    # 1.0f
        0x0
    .end array-data
.end method

.method private showBrushSettings()V
    .registers 7

    .line 1022
    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$HMxIoONEeCFbjg7hilLXI0vVNZI;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$HMxIoONEeCFbjg7hilLXI0vVNZI;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    .line 1046
    const/high16 v0, 0x42400000    # 48.0f

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    .line 1022
    const/16 v3, 0x55

    const/4 v4, 0x0

    move-object v0, p0

    move-object v2, p0

    invoke-direct/range {v0 .. v5}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showPopup(Ljava/lang/Runnable;Landroid/view/View;III)V

    .line 1047
    return-void
.end method

.method private showMenuForEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V
    .registers 10
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 926
    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v0

    iget v0, v0, Lim/tpelyyftgw/ui/components/Point;->x:F

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getWidth()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    int-to-float v1, v1

    sub-float/2addr v0, v1

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getScaleX()F

    move-result v1

    mul-float v0, v0, v1

    float-to-int v0, v0

    .line 927
    .local v0, "x":I
    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v1

    iget v1, v1, Lim/tpelyyftgw/ui/components/Point;->y:F

    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getHeight()I

    move-result v2

    int-to-float v2, v2

    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getScale()F

    move-result v3

    mul-float v2, v2, v3

    const/high16 v3, 0x40000000    # 2.0f

    div-float/2addr v2, v3

    sub-float/2addr v1, v2

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v2}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getHeight()I

    move-result v2

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    sub-float/2addr v1, v2

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v2}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getScaleY()F

    move-result v2

    mul-float v1, v1, v2

    float-to-int v1, v1

    const/high16 v2, 0x42000000    # 32.0f

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    sub-int v7, v1, v2

    .line 929
    .local v7, "y":I
    new-instance v2, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$AJkovZqpUJRFA1x38qjaGDsa4w8;

    invoke-direct {v2, p0, p1}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$AJkovZqpUJRFA1x38qjaGDsa4w8;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    const/16 v4, 0x11

    move-object v1, p0

    move-object v3, p1

    move v5, v0

    move v6, v7

    invoke-direct/range {v1 .. v6}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showPopup(Ljava/lang/Runnable;Landroid/view/View;III)V

    .line 993
    return-void
.end method

.method private showPopup(Ljava/lang/Runnable;Landroid/view/View;III)V
    .registers 11
    .param p1, "setupRunnable"    # Ljava/lang/Runnable;
    .param p2, "parent"    # Landroid/view/View;
    .param p3, "gravity"    # I
    .param p4, "x"    # I
    .param p5, "y"    # I

    .line 1110
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_10

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_10

    .line 1111
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss()V

    .line 1112
    return-void

    .line 1115
    :cond_10
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-nez v0, :cond_44

    .line 1116
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupRect:Landroid/graphics/Rect;

    .line 1117
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v0, v3}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    .line 1118
    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->setAnimationEnabled(Z)V

    .line 1119
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    new-instance v3, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$XMm8vzA5OmBEy5v9bd8WqxqDKNg;

    invoke-direct {v3, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$XMm8vzA5OmBEy5v9bd8WqxqDKNg;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 1130
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    new-instance v3, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$GZ04aH7AqO2g0f4yafqpxuA7v4A;

    invoke-direct {v3, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$GZ04aH7AqO2g0f4yafqpxuA7v4A;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->setDispatchKeyEventListener(Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$OnDispatchKeyEventListener;)V

    .line 1135
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->setShowedFromBotton(Z)V

    .line 1138
    :cond_44
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->removeInnerViews()V

    .line 1139
    invoke-interface {p1}, Ljava/lang/Runnable;->run()V

    .line 1141
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-nez v0, :cond_8d

    .line 1142
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    const/4 v4, -0x2

    invoke-direct {v0, v3, v4, v4}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;-><init>(Landroid/view/View;II)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    .line 1143
    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setAnimationEnabled(Z)V

    .line 1144
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const v3, 0x7f1000e8

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setAnimationStyle(I)V

    .line 1145
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setOutsideTouchable(Z)V

    .line 1146
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setClippingEnabled(Z)V

    .line 1147
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const/4 v3, 0x2

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setInputMethodMode(I)V

    .line 1148
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setSoftInputMode(I)V

    .line 1149
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->getContentView()Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/View;->setFocusableInTouchMode(Z)V

    .line 1150
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$gQLNL9D2DlTq0aJu0SM5_Wzn1F4;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$gQLNL9D2DlTq0aJu0SM5_Wzn1F4;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V

    .line 1153
    :cond_8d
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    const/high16 v1, 0x447a0000    # 1000.0f

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    const/high16 v4, -0x80000000

    invoke-static {v3, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v3

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    invoke-static {v1, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    invoke-virtual {v0, v3, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->measure(II)V

    .line 1155
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->setFocusable(Z)V

    .line 1157
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0, p2, p3, p4, p5}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->showAtLocation(Landroid/view/View;III)V

    .line 1158
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->startAnimation()V

    .line 1159
    return-void
.end method

.method private showTextSettings()V
    .registers 7

    .line 1090
    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$vZsOYH9ZNtOPq-bIqdnQNjEELAA;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$vZsOYH9ZNtOPq-bIqdnQNjEELAA;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    .line 1106
    const/high16 v0, 0x42400000    # 48.0f

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    .line 1090
    const/16 v3, 0x55

    const/4 v4, 0x0

    move-object v0, p0

    move-object v2, p0

    invoke-direct/range {v0 .. v5}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showPopup(Ljava/lang/Runnable;Landroid/view/View;III)V

    .line 1107
    return-void
.end method

.method private startPositionRelativeToEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Lim/tpelyyftgw/ui/components/Point;
    .registers 16
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 622
    const/high16 v0, 0x43480000    # 200.0f

    .line 624
    .local v0, "offset":F
    const/high16 v1, 0x43480000    # 200.0f

    if-eqz p1, :cond_16

    .line 625
    invoke-virtual {p1}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v2

    .line 626
    .local v2, "position":Lim/tpelyyftgw/ui/components/Point;
    new-instance v3, Lim/tpelyyftgw/ui/components/Point;

    iget v4, v2, Lim/tpelyyftgw/ui/components/Point;->x:F

    add-float/2addr v4, v1

    iget v5, v2, Lim/tpelyyftgw/ui/components/Point;->y:F

    add-float/2addr v5, v1

    invoke-direct {v3, v4, v5}, Lim/tpelyyftgw/ui/components/Point;-><init>(FF)V

    return-object v3

    .line 628
    .end local v2    # "position":Lim/tpelyyftgw/ui/components/Point;
    :cond_16
    const/high16 v2, 0x42c80000    # 100.0f

    .line 629
    .local v2, "minimalDistance":F
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->centerPositionForEntity()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v3

    .line 632
    .local v3, "position":Lim/tpelyyftgw/ui/components/Point;
    :goto_1c
    const/4 v4, 0x0

    .line 633
    .local v4, "occupied":Z
    const/4 v5, 0x0

    .local v5, "index":I
    :goto_1e
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v6}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildCount()I

    move-result v6

    if-ge v5, v6, :cond_5e

    .line 634
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v6, v5}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildAt(I)Landroid/view/View;

    move-result-object v6

    .line 635
    .local v6, "view":Landroid/view/View;
    instance-of v7, v6, Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    if-nez v7, :cond_31

    .line 636
    goto :goto_5b

    .line 638
    :cond_31
    move-object v7, v6

    check-cast v7, Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    invoke-virtual {v7}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v7

    .line 639
    .local v7, "location":Lim/tpelyyftgw/ui/components/Point;
    iget v8, v7, Lim/tpelyyftgw/ui/components/Point;->x:F

    iget v9, v3, Lim/tpelyyftgw/ui/components/Point;->x:F

    sub-float/2addr v8, v9

    float-to-double v8, v8

    const-wide/high16 v10, 0x4000000000000000L    # 2.0

    invoke-static {v8, v9, v10, v11}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v8

    iget v12, v7, Lim/tpelyyftgw/ui/components/Point;->y:F

    iget v13, v3, Lim/tpelyyftgw/ui/components/Point;->y:F

    sub-float/2addr v12, v13

    float-to-double v12, v12

    invoke-static {v12, v13, v10, v11}, Ljava/lang/Math;->pow(DD)D

    move-result-wide v10

    add-double/2addr v8, v10

    invoke-static {v8, v9}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v8

    double-to-float v8, v8

    .line 640
    .local v8, "distance":F
    const/high16 v9, 0x42c80000    # 100.0f

    cmpg-float v9, v8, v9

    if-gez v9, :cond_5b

    .line 641
    const/4 v4, 0x1

    .line 633
    .end local v6    # "view":Landroid/view/View;
    .end local v7    # "location":Lim/tpelyyftgw/ui/components/Point;
    .end local v8    # "distance":F
    :cond_5b
    :goto_5b
    add-int/lit8 v5, v5, 0x1

    goto :goto_1e

    .line 645
    .end local v5    # "index":I
    :cond_5e
    if-nez v4, :cond_62

    .line 646
    nop

    .line 651
    .end local v4    # "occupied":Z
    return-object v3

    .line 648
    .restart local v4    # "occupied":Z
    :cond_62
    new-instance v5, Lim/tpelyyftgw/ui/components/Point;

    iget v6, v3, Lim/tpelyyftgw/ui/components/Point;->x:F

    add-float/2addr v6, v1

    iget v7, v3, Lim/tpelyyftgw/ui/components/Point;->y:F

    add-float/2addr v7, v1

    invoke-direct {v5, v6, v7}, Lim/tpelyyftgw/ui/components/Point;-><init>(FF)V

    move-object v3, v5

    .line 649
    .end local v4    # "occupied":Z
    goto :goto_1c
.end method

.method private updateSettingsButton()V
    .registers 7

    .line 329
    const v0, 0x7f0802c5

    .line 330
    .local v0, "resource":I
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    const v2, 0x7f0802c4

    if-eqz v1, :cond_25

    .line 331
    instance-of v3, v1, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    if-eqz v3, :cond_12

    .line 332
    const v0, 0x7f0802c2

    goto :goto_19

    .line 333
    :cond_12
    instance-of v1, v1, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v1, :cond_19

    .line 334
    const v0, 0x7f0802c3

    .line 336
    :cond_19
    :goto_19
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 337
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setColorFilter(Landroid/graphics/ColorFilter;)V

    goto :goto_39

    .line 339
    :cond_25
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    new-instance v3, Landroid/graphics/PorterDuffColorFilter;

    const v4, -0xae420d

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v3, v4, v5}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 340
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintButton:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 343
    :goto_39
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v1, v0}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->setSettingsButtonImage(I)V

    .line 344
    return-void
.end method


# virtual methods
.method public allowInteraction(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z
    .registers 3
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 613
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    xor-int/lit8 v0, v0, 0x1

    return v0
.end method

.method public closeTextEnter(Z)V
    .registers 6
    .param p1, "apply"    # Z

    .line 868
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    if-eqz v0, :cond_68

    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    instance-of v1, v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-nez v1, :cond_b

    goto :goto_68

    .line 872
    :cond_b
    check-cast v0, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    .line 874
    .local v0, "textPaintView":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 876
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getFocusedView()Landroid/view/View;

    move-result-object v1

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->hideKeyboard(Landroid/view/View;)V

    .line 878
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getFocusedView()Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1}, Landroid/view/View;->clearFocus()V

    .line 879
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->endEditing()V

    .line 881
    if-nez p1, :cond_2b

    .line 882
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->initialText:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setText(Ljava/lang/String;)V

    .line 885
    :cond_2b
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->getText()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    const/4 v3, 0x0

    if-nez v1, :cond_43

    .line 886
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v1, v0}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->removeView(Landroid/view/View;)V

    .line 887
    invoke-direct {p0, v3}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    goto :goto_59

    .line 889
    :cond_43
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextPosition:Lim/tpelyyftgw/ui/components/Point;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setPosition(Lim/tpelyyftgw/ui/components/Point;)V

    .line 890
    iget v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextRotation:F

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setRotation(F)V

    .line 891
    iget v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextScale:F

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;->setScale(F)V

    .line 893
    iput-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextPosition:Lim/tpelyyftgw/ui/components/Point;

    .line 894
    const/4 v1, 0x0

    iput v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextRotation:F

    .line 895
    iput v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editedTextScale:F

    .line 898
    :goto_59
    invoke-direct {p0, v2, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setTextDimVisibility(ZLim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 900
    iput-boolean v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    .line 901
    iput-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->initialText:Ljava/lang/String;

    .line 903
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->curtainView:Landroid/widget/FrameLayout;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 904
    return-void

    .line 869
    .end local v0    # "textPaintView":Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;
    :cond_68
    :goto_68
    return-void
.end method

.method public getBitmap()Landroid/graphics/Bitmap;
    .registers 12

    .line 385
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/RenderView;->getResultBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 386
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    if-eqz v0, :cond_a4

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->entitiesCount()I

    move-result v1

    if-lez v1, :cond_a4

    .line 387
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 389
    .local v1, "canvas":Landroid/graphics/Canvas;
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_16
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v3}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildCount()I

    move-result v3

    if-ge v2, v3, :cond_a4

    .line 390
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v3, v2}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    .line 391
    .local v3, "v":Landroid/view/View;
    invoke-virtual {v1}, Landroid/graphics/Canvas;->save()I

    .line 392
    instance-of v4, v3, Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    if-eqz v4, :cond_9d

    .line 393
    move-object v4, v3

    check-cast v4, Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 395
    .local v4, "entity":Lim/tpelyyftgw/ui/components/paint/views/EntityView;
    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v5

    iget v5, v5, Lim/tpelyyftgw/ui/components/Point;->x:F

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getPosition()Lim/tpelyyftgw/ui/components/Point;

    move-result-object v6

    iget v6, v6, Lim/tpelyyftgw/ui/components/Point;->y:F

    invoke-virtual {v1, v5, v6}, Landroid/graphics/Canvas;->translate(FF)V

    .line 396
    invoke-virtual {v3}, Landroid/view/View;->getScaleX()F

    move-result v5

    invoke-virtual {v3}, Landroid/view/View;->getScaleY()F

    move-result v6

    invoke-virtual {v1, v5, v6}, Landroid/graphics/Canvas;->scale(FF)V

    .line 397
    invoke-virtual {v3}, Landroid/view/View;->getRotation()F

    move-result v5

    invoke-virtual {v1, v5}, Landroid/graphics/Canvas;->rotate(F)V

    .line 398
    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getWidth()I

    move-result v5

    neg-int v5, v5

    div-int/lit8 v5, v5, 0x2

    int-to-float v5, v5

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->getHeight()I

    move-result v6

    neg-int v6, v6

    div-int/lit8 v6, v6, 0x2

    int-to-float v6, v6

    invoke-virtual {v1, v5, v6}, Landroid/graphics/Canvas;->translate(FF)V

    .line 400
    instance-of v5, v3, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v5, :cond_9a

    .line 401
    invoke-virtual {v3}, Landroid/view/View;->getWidth()I

    move-result v5

    invoke-virtual {v3}, Landroid/view/View;->getHeight()I

    move-result v6

    sget-object v7, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v5, v6, v7}, Lim/tpelyyftgw/messenger/Bitmaps;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v5

    .line 402
    .local v5, "b":Landroid/graphics/Bitmap;
    new-instance v6, Landroid/graphics/Canvas;

    invoke-direct {v6, v5}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 403
    .local v6, "c":Landroid/graphics/Canvas;
    invoke-virtual {v3, v6}, Landroid/view/View;->draw(Landroid/graphics/Canvas;)V

    .line 404
    new-instance v7, Landroid/graphics/Rect;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v8

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v9

    const/4 v10, 0x0

    invoke-direct {v7, v10, v10, v8, v9}, Landroid/graphics/Rect;-><init>(IIII)V

    const/4 v8, 0x0

    invoke-virtual {v1, v5, v8, v7, v8}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 406
    :try_start_8e
    invoke-virtual {v6, v8}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V
    :try_end_91
    .catch Ljava/lang/Exception; {:try_start_8e .. :try_end_91} :catch_92

    .line 409
    goto :goto_96

    .line 407
    :catch_92
    move-exception v7

    .line 408
    .local v7, "e":Ljava/lang/Exception;
    invoke-static {v7}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 410
    .end local v7    # "e":Ljava/lang/Exception;
    :goto_96
    invoke-virtual {v5}, Landroid/graphics/Bitmap;->recycle()V

    .line 411
    .end local v5    # "b":Landroid/graphics/Bitmap;
    .end local v6    # "c":Landroid/graphics/Canvas;
    goto :goto_9d

    .line 412
    :cond_9a
    invoke-virtual {v3, v1}, Landroid/view/View;->draw(Landroid/graphics/Canvas;)V

    .line 415
    .end local v4    # "entity":Lim/tpelyyftgw/ui/components/paint/views/EntityView;
    :cond_9d
    :goto_9d
    invoke-virtual {v1}, Landroid/graphics/Canvas;->restore()V

    .line 389
    .end local v3    # "v":Landroid/view/View;
    add-int/lit8 v2, v2, 0x1

    goto/16 :goto_16

    .line 418
    .end local v1    # "canvas":Landroid/graphics/Canvas;
    .end local v2    # "i":I
    :cond_a4
    return-object v0
.end method

.method public getCancelTextView()Landroid/widget/TextView;
    .registers 2

    .line 373
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->cancelTextView:Landroid/widget/TextView;

    return-object v0
.end method

.method public getColorPicker()Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;
    .registers 2

    .line 377
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    return-object v0
.end method

.method public getDoneTextView()Landroid/widget/TextView;
    .registers 2

    .line 369
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->doneTextView:Landroid/widget/TextView;

    return-object v0
.end method

.method public getMasks()Ljava/util/ArrayList;
    .registers 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList<",
            "Lim/tpelyyftgw/tgnet/TLRPC$InputDocument;",
            ">;"
        }
    .end annotation

    .line 656
    const/4 v0, 0x0

    .line 657
    .local v0, "result":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lim/tpelyyftgw/tgnet/TLRPC$InputDocument;>;"
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildCount()I

    move-result v1

    .line 658
    .local v1, "count":I
    const/4 v2, 0x0

    .local v2, "a":I
    :goto_8
    if-ge v2, v1, :cond_43

    .line 659
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v3, v2}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    .line 660
    .local v3, "child":Landroid/view/View;
    instance-of v4, v3, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    if-eqz v4, :cond_40

    .line 661
    move-object v4, v3

    check-cast v4, Lim/tpelyyftgw/ui/components/paint/views/StickerView;

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/StickerView;->getSticker()Lim/tpelyyftgw/tgnet/TLRPC$Document;

    move-result-object v4

    .line 662
    .local v4, "document":Lim/tpelyyftgw/tgnet/TLRPC$Document;
    if-nez v0, :cond_23

    .line 663
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    move-object v0, v5

    .line 665
    :cond_23
    new-instance v5, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;

    invoke-direct {v5}, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;-><init>()V

    .line 666
    .local v5, "inputDocument":Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;
    iget-wide v6, v4, Lim/tpelyyftgw/tgnet/TLRPC$Document;->id:J

    iput-wide v6, v5, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;->id:J

    .line 667
    iget-wide v6, v4, Lim/tpelyyftgw/tgnet/TLRPC$Document;->access_hash:J

    iput-wide v6, v5, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;->access_hash:J

    .line 668
    iget-object v6, v4, Lim/tpelyyftgw/tgnet/TLRPC$Document;->file_reference:[B

    iput-object v6, v5, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;->file_reference:[B

    .line 669
    iget-object v6, v5, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;->file_reference:[B

    if-nez v6, :cond_3d

    .line 670
    const/4 v6, 0x0

    new-array v6, v6, [B

    iput-object v6, v5, Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;->file_reference:[B

    .line 672
    :cond_3d
    invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 658
    .end local v3    # "child":Landroid/view/View;
    .end local v4    # "document":Lim/tpelyyftgw/tgnet/TLRPC$Document;
    .end local v5    # "inputDocument":Lim/tpelyyftgw/tgnet/TLRPC$TL_inputDocument;
    :cond_40
    add-int/lit8 v2, v2, 0x1

    goto :goto_8

    .line 675
    .end local v2    # "a":I
    :cond_43
    return-object v0
.end method

.method public getToolsView()Landroid/widget/FrameLayout;
    .registers 2

    .line 365
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    return-object v0
.end method

.method public init()V
    .registers 3

    .line 347
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/RenderView;->setVisibility(I)V

    .line 348
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->detectFaces()V

    .line 349
    return-void
.end method

.method public synthetic lambda$buttonForBrush$12$PhotoPaintView(ILandroid/view/View;)V
    .registers 5
    .param p1, "brush"    # I
    .param p2, "v"    # Landroid/view/View;

    .line 999
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setBrush(I)V

    .line 1001
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_13

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 1002
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss(Z)V

    .line 1004
    :cond_13
    return-void
.end method

.method public synthetic lambda$buttonForText$14$PhotoPaintView(ZLandroid/view/View;)V
    .registers 5
    .param p1, "stroke"    # Z
    .param p2, "v"    # Landroid/view/View;

    .line 1058
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setStroke(Z)V

    .line 1060
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_13

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 1061
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss(Z)V

    .line 1063
    :cond_13
    return-void
.end method

.method public synthetic lambda$detectFaces$19$PhotoPaintView()V
    .registers 12

    .line 1183
    const/4 v0, 0x0

    .line 1185
    .local v0, "faceDetector":Lcom/google/android/gms/vision/face/FaceDetector;
    :try_start_1
    new-instance v1, Lcom/google/android/gms/vision/face/FaceDetector$Builder;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/google/android/gms/vision/face/FaceDetector$Builder;-><init>(Landroid/content/Context;)V

    .line 1186
    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/google/android/gms/vision/face/FaceDetector$Builder;->setMode(I)Lcom/google/android/gms/vision/face/FaceDetector$Builder;

    move-result-object v1

    .line 1187
    invoke-virtual {v1, v2}, Lcom/google/android/gms/vision/face/FaceDetector$Builder;->setLandmarkType(I)Lcom/google/android/gms/vision/face/FaceDetector$Builder;

    move-result-object v1

    const/4 v2, 0x0

    .line 1188
    invoke-virtual {v1, v2}, Lcom/google/android/gms/vision/face/FaceDetector$Builder;->setTrackingEnabled(Z)Lcom/google/android/gms/vision/face/FaceDetector$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/google/android/gms/vision/face/FaceDetector$Builder;->build()Lcom/google/android/gms/vision/face/FaceDetector;

    move-result-object v1

    move-object v0, v1

    .line 1189
    invoke-virtual {v0}, Lcom/google/android/gms/vision/face/FaceDetector;->isOperational()Z

    move-result v1

    if-nez v1, :cond_32

    .line 1190
    sget-boolean v1, Lim/tpelyyftgw/messenger/BuildVars;->LOGS_ENABLED:Z

    if-eqz v1, :cond_2c

    .line 1191
    const-string v1, "face detection is not operational"

    invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/String;)V
    :try_end_2c
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_2c} :catch_93
    .catchall {:try_start_1 .. :try_end_2c} :catchall_91

    .line 1218
    :cond_2c
    if-eqz v0, :cond_31

    .line 1219
    invoke-virtual {v0}, Lcom/google/android/gms/vision/face/FaceDetector;->release()V

    .line 1193
    :cond_31
    return-void

    .line 1196
    :cond_32
    :try_start_32
    new-instance v1, Lcom/google/android/gms/vision/Frame$Builder;

    invoke-direct {v1}, Lcom/google/android/gms/vision/Frame$Builder;-><init>()V

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v1, v2}, Lcom/google/android/gms/vision/Frame$Builder;->setBitmap(Landroid/graphics/Bitmap;)Lcom/google/android/gms/vision/Frame$Builder;

    move-result-object v1

    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getFrameRotation()I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/google/android/gms/vision/Frame$Builder;->setRotation(I)Lcom/google/android/gms/vision/Frame$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/google/android/gms/vision/Frame$Builder;->build()Lcom/google/android/gms/vision/Frame;

    move-result-object v1
    :try_end_49
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_49} :catch_93
    .catchall {:try_start_32 .. :try_end_49} :catchall_91

    .line 1199
    .local v1, "frame":Lcom/google/android/gms/vision/Frame;
    :try_start_49
    invoke-virtual {v0, v1}, Lcom/google/android/gms/vision/face/FaceDetector;->detect(Lcom/google/android/gms/vision/Frame;)Landroid/util/SparseArray;

    move-result-object v2
    :try_end_4d
    .catchall {:try_start_49 .. :try_end_4d} :catchall_87

    .line 1203
    .local v2, "faces":Landroid/util/SparseArray;, "Landroid/util/SparseArray<Lcom/google/android/gms/vision/face/Face;>;"
    nop

    .line 1204
    :try_start_4e
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 1205
    .local v3, "result":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lim/tpelyyftgw/ui/components/paint/PhotoFace;>;"
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getPaintingSize()Lim/tpelyyftgw/ui/components/Size;

    move-result-object v4

    .line 1206
    .local v4, "targetSize":Lim/tpelyyftgw/ui/components/Size;
    const/4 v5, 0x0

    .local v5, "i":I
    :goto_58
    invoke-virtual {v2}, Landroid/util/SparseArray;->size()I

    move-result v6

    if-ge v5, v6, :cond_7f

    .line 1207
    invoke-virtual {v2, v5}, Landroid/util/SparseArray;->keyAt(I)I

    move-result v6

    .line 1208
    .local v6, "key":I
    invoke-virtual {v2, v6}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/google/android/gms/vision/face/Face;

    .line 1209
    .local v7, "f":Lcom/google/android/gms/vision/face/Face;
    new-instance v8, Lim/tpelyyftgw/ui/components/paint/PhotoFace;

    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v10

    invoke-direct {v8, v7, v9, v4, v10}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;-><init>(Lcom/google/android/gms/vision/face/Face;Landroid/graphics/Bitmap;Lim/tpelyyftgw/ui/components/Size;Z)V

    .line 1210
    .local v8, "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/PhotoFace;->isSufficient()Z

    move-result v9

    if-eqz v9, :cond_7c

    .line 1211
    invoke-virtual {v3, v8}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 1206
    .end local v6    # "key":I
    .end local v7    # "f":Lcom/google/android/gms/vision/face/Face;
    .end local v8    # "face":Lim/tpelyyftgw/ui/components/paint/PhotoFace;
    :cond_7c
    add-int/lit8 v5, v5, 0x1

    goto :goto_58

    .line 1214
    .end local v5    # "i":I
    :cond_7f
    iput-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->faces:Ljava/util/ArrayList;
    :try_end_81
    .catch Ljava/lang/Exception; {:try_start_4e .. :try_end_81} :catch_93
    .catchall {:try_start_4e .. :try_end_81} :catchall_91

    .line 1218
    .end local v1    # "frame":Lcom/google/android/gms/vision/Frame;
    .end local v2    # "faces":Landroid/util/SparseArray;, "Landroid/util/SparseArray<Lcom/google/android/gms/vision/face/Face;>;"
    .end local v3    # "result":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lim/tpelyyftgw/ui/components/paint/PhotoFace;>;"
    .end local v4    # "targetSize":Lim/tpelyyftgw/ui/components/Size;
    if-eqz v0, :cond_9a

    .line 1219
    :goto_83
    invoke-virtual {v0}, Lcom/google/android/gms/vision/face/FaceDetector;->release()V

    goto :goto_9a

    .line 1200
    .restart local v1    # "frame":Lcom/google/android/gms/vision/Frame;
    :catchall_87
    move-exception v2

    .line 1201
    .local v2, "e":Ljava/lang/Throwable;
    :try_start_88
    invoke-static {v2}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
    :try_end_8b
    .catch Ljava/lang/Exception; {:try_start_88 .. :try_end_8b} :catch_93
    .catchall {:try_start_88 .. :try_end_8b} :catchall_91

    .line 1218
    if-eqz v0, :cond_90

    .line 1219
    invoke-virtual {v0}, Lcom/google/android/gms/vision/face/FaceDetector;->release()V

    .line 1202
    :cond_90
    return-void

    .line 1218
    .end local v1    # "frame":Lcom/google/android/gms/vision/Frame;
    .end local v2    # "e":Ljava/lang/Throwable;
    :catchall_91
    move-exception v1

    goto :goto_9b

    .line 1215
    :catch_93
    move-exception v1

    .line 1216
    .local v1, "e":Ljava/lang/Exception;
    :try_start_94
    invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V
    :try_end_97
    .catchall {:try_start_94 .. :try_end_97} :catchall_91

    .line 1218
    .end local v1    # "e":Ljava/lang/Exception;
    if-eqz v0, :cond_9a

    .line 1219
    goto :goto_83

    .line 1222
    :cond_9a
    :goto_9a
    return-void

    .line 1218
    :goto_9b
    if-eqz v0, :cond_a0

    .line 1219
    invoke-virtual {v0}, Lcom/google/android/gms/vision/face/FaceDetector;->release()V

    .line 1221
    :cond_a0
    goto :goto_a2

    :goto_a1
    throw v1

    :goto_a2
    goto :goto_a1
.end method

.method public synthetic lambda$new$0$PhotoPaintView()V
    .registers 3

    .line 123
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->undoStore:Lim/tpelyyftgw/ui/components/paint/UndoStore;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/paint/UndoStore;->canUndo()Z

    move-result v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->setUndoEnabled(Z)V

    return-void
.end method

.method public synthetic lambda$new$1$PhotoPaintView(Landroid/view/View;)V
    .registers 3
    .param p1, "v"    # Landroid/view/View;

    .line 190
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->closeTextEnter(Z)V

    return-void
.end method

.method public synthetic lambda$new$2$PhotoPaintView(Landroid/view/View;)V
    .registers 3
    .param p1, "v"    # Landroid/view/View;

    .line 272
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    return-void
.end method

.method public synthetic lambda$new$3$PhotoPaintView(Landroid/view/View;)V
    .registers 2
    .param p1, "v"    # Landroid/view/View;

    .line 279
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->openStickersView()V

    return-void
.end method

.method public synthetic lambda$new$4$PhotoPaintView(Landroid/view/View;)V
    .registers 2
    .param p1, "v"    # Landroid/view/View;

    .line 286
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->createText()V

    return-void
.end method

.method public synthetic lambda$null$10$PhotoPaintView(Landroid/view/View;)V
    .registers 4
    .param p1, "v"    # Landroid/view/View;

    .line 978
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->duplicateSelectedEntity()V

    .line 980
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_13

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 981
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss(Z)V

    .line 983
    :cond_13
    return-void
.end method

.method public synthetic lambda$null$8$PhotoPaintView(Lim/tpelyyftgw/ui/components/paint/views/EntityView;Landroid/view/View;)V
    .registers 5
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;
    .param p2, "v"    # Landroid/view/View;

    .line 942
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->removeEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 944
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_13

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 945
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss(Z)V

    .line 947
    :cond_13
    return-void
.end method

.method public synthetic lambda$null$9$PhotoPaintView(Landroid/view/View;)V
    .registers 4
    .param p1, "v"    # Landroid/view/View;

    .line 960
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editSelectedTextEntity()V

    .line 962
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_13

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 963
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss(Z)V

    .line 965
    :cond_13
    return-void
.end method

.method public synthetic lambda$registerRemovalUndo$7$PhotoPaintView(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V
    .registers 2
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 801
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->removeEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    return-void
.end method

.method public synthetic lambda$showBrushSettings$13$PhotoPaintView()V
    .registers 11

    .line 1023
    iget v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentBrush:I

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-nez v0, :cond_8

    const/4 v0, 0x1

    goto :goto_9

    :cond_8
    const/4 v0, 0x0

    :goto_9
    const v3, 0x7f0802b5

    invoke-direct {p0, v1, v3, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->buttonForBrush(IIZ)Landroid/widget/FrameLayout;

    move-result-object v0

    .line 1024
    .local v0, "radial":Landroid/view/View;
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v3, v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->addView(Landroid/view/View;)V

    .line 1026
    invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v3

    check-cast v3, Landroid/widget/LinearLayout$LayoutParams;

    .line 1027
    .local v3, "layoutParams":Landroid/widget/LinearLayout$LayoutParams;
    const/4 v4, -0x1

    iput v4, v3, Landroid/widget/LinearLayout$LayoutParams;->width:I

    .line 1028
    const/high16 v5, 0x42500000    # 52.0f

    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    iput v6, v3, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 1029
    invoke-virtual {v0, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 1031
    const v6, 0x7f0802b1

    iget v7, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentBrush:I

    if-ne v7, v2, :cond_32

    const/4 v7, 0x1

    goto :goto_33

    :cond_32
    const/4 v7, 0x0

    :goto_33
    invoke-direct {p0, v2, v6, v7}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->buttonForBrush(IIZ)Landroid/widget/FrameLayout;

    move-result-object v6

    .line 1032
    .local v6, "elliptical":Landroid/view/View;
    iget-object v7, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v7, v6}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->addView(Landroid/view/View;)V

    .line 1034
    invoke-virtual {v6}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v7

    move-object v3, v7

    check-cast v3, Landroid/widget/LinearLayout$LayoutParams;

    .line 1035
    iput v4, v3, Landroid/widget/LinearLayout$LayoutParams;->width:I

    .line 1036
    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    iput v7, v3, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 1037
    invoke-virtual {v6, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 1039
    const v7, 0x7f0802b3

    iget v8, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentBrush:I

    const/4 v9, 0x2

    if-ne v8, v9, :cond_57

    const/4 v1, 0x1

    :cond_57
    invoke-direct {p0, v9, v7, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->buttonForBrush(IIZ)Landroid/widget/FrameLayout;

    move-result-object v1

    .line 1040
    .local v1, "neon":Landroid/view/View;
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->addView(Landroid/view/View;)V

    .line 1042
    invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout$LayoutParams;

    .line 1043
    .end local v3    # "layoutParams":Landroid/widget/LinearLayout$LayoutParams;
    .local v2, "layoutParams":Landroid/widget/LinearLayout$LayoutParams;
    iput v4, v2, Landroid/widget/LinearLayout$LayoutParams;->width:I

    .line 1044
    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    iput v3, v2, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 1045
    invoke-virtual {v1, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 1046
    return-void
.end method

.method public synthetic lambda$showMenuForEntity$11$PhotoPaintView(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V
    .registers 16
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 930
    new-instance v0, Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 931
    .local v0, "parent":Landroid/widget/LinearLayout;
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 933
    new-instance v2, Landroid/widget/TextView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 934
    .local v2, "deleteView":Landroid/widget/TextView;
    const-string v3, "actionBarDefaultSubmenuItem"

    invoke-static {v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    invoke-virtual {v2, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 935
    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getSelectorDrawable(Z)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    invoke-virtual {v2, v4}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 936
    const/16 v4, 0x10

    invoke-virtual {v2, v4}, Landroid/widget/TextView;->setGravity(I)V

    .line 937
    const/high16 v5, 0x41800000    # 16.0f

    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    const/high16 v7, 0x41600000    # 14.0f

    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v8

    invoke-virtual {v2, v6, v1, v8, v1}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 938
    const/high16 v6, 0x41900000    # 18.0f

    const/4 v8, 0x1

    invoke-virtual {v2, v8, v6}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 939
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v9

    invoke-virtual {v2, v9}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 940
    const-string v9, "PaintDelete"

    const v10, 0x7f0f0ac1

    invoke-static {v9, v10}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v2, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 941
    new-instance v9, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$oMKb7dToFKBeAQ20qpb0P2P1QZE;

    invoke-direct {v9, p0, p1}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$oMKb7dToFKBeAQ20qpb0P2P1QZE;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    invoke-virtual {v2, v9}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 948
    const/16 v9, 0x30

    const/4 v10, -0x2

    invoke-static {v10, v9}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(II)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v11

    invoke-virtual {v0, v2, v11}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 950
    instance-of v11, p1, Lim/tpelyyftgw/ui/components/paint/views/TextPaintView;

    if-eqz v11, :cond_b3

    .line 951
    new-instance v11, Landroid/widget/TextView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v12

    invoke-direct {v11, v12}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 952
    .local v11, "editView":Landroid/widget/TextView;
    invoke-static {v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setTextColor(I)V

    .line 953
    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getSelectorDrawable(Z)Landroid/graphics/drawable/Drawable;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 954
    invoke-virtual {v11, v4}, Landroid/widget/TextView;->setGravity(I)V

    .line 955
    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v12

    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v13

    invoke-virtual {v11, v12, v1, v13, v1}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 956
    invoke-virtual {v11, v8, v6}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 957
    invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 958
    const v12, 0x7f0f0ac3

    const-string v13, "PaintEdit"

    invoke-static {v13, v12}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 959
    new-instance v12, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$9-FGcUe4DXYYg62zizFNJzEybMY;

    invoke-direct {v12, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$9-FGcUe4DXYYg62zizFNJzEybMY;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v11, v12}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 966
    invoke-static {v10, v9}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(II)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v12

    invoke-virtual {v0, v11, v12}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 969
    .end local v11    # "editView":Landroid/widget/TextView;
    :cond_b3
    new-instance v11, Landroid/widget/TextView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->getContext()Landroid/content/Context;

    move-result-object v12

    invoke-direct {v11, v12}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 970
    .local v11, "duplicateView":Landroid/widget/TextView;
    invoke-static {v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v3

    invoke-virtual {v11, v3}, Landroid/widget/TextView;->setTextColor(I)V

    .line 971
    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getSelectorDrawable(Z)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-virtual {v11, v3}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 972
    invoke-virtual {v11, v4}, Landroid/widget/TextView;->setGravity(I)V

    .line 973
    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    invoke-virtual {v11, v3, v1, v4, v1}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 974
    invoke-virtual {v11, v8, v6}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 975
    const/4 v1, 0x2

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v11, v1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 976
    const v1, 0x7f0f0ac2

    const-string v3, "PaintDuplicate"

    invoke-static {v3, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v11, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 977
    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$JDEUvbzYMbohTV_FXX7RPsYs3cY;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$JDEUvbzYMbohTV_FXX7RPsYs3cY;-><init>(Lim/tpelyyftgw/ui/components/PhotoPaintView;)V

    invoke-virtual {v11, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 984
    invoke-static {v10, v9}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(II)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {v0, v11, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 986
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v1, v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->addView(Landroid/view/View;)V

    .line 988
    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 989
    .local v1, "params":Landroid/widget/LinearLayout$LayoutParams;
    iput v10, v1, Landroid/widget/LinearLayout$LayoutParams;->width:I

    .line 990
    iput v10, v1, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 991
    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 992
    return-void
.end method

.method public synthetic lambda$showPopup$16$PhotoPaintView(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .registers 6
    .param p1, "v"    # Landroid/view/View;
    .param p2, "event"    # Landroid/view/MotionEvent;

    .line 1120
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getActionMasked()I

    move-result v0

    if-nez v0, :cond_2c

    .line 1121
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_2c

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_2c

    .line 1122
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupRect:Landroid/graphics/Rect;

    invoke-virtual {p1, v0}, Landroid/view/View;->getHitRect(Landroid/graphics/Rect;)V

    .line 1123
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupRect:Landroid/graphics/Rect;

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    float-to-int v1, v1

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v2

    float-to-int v2, v2

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Rect;->contains(II)Z

    move-result v0

    if-nez v0, :cond_2c

    .line 1124
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss()V

    .line 1128
    :cond_2c
    const/4 v0, 0x0

    return v0
.end method

.method public synthetic lambda$showPopup$17$PhotoPaintView(Landroid/view/KeyEvent;)V
    .registers 4
    .param p1, "keyEvent"    # Landroid/view/KeyEvent;

    .line 1131
    invoke-virtual {p1}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_1c

    invoke-virtual {p1}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v0

    if-nez v0, :cond_1c

    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    if-eqz v0, :cond_1c

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_1c

    .line 1132
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupWindow:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow;->dismiss()V

    .line 1134
    :cond_1c
    return-void
.end method

.method public synthetic lambda$showPopup$18$PhotoPaintView()V
    .registers 2

    .line 1150
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->removeInnerViews()V

    return-void
.end method

.method public synthetic lambda$showTextSettings$15$PhotoPaintView()V
    .registers 8

    .line 1091
    const-string v0, "PaintOutlined"

    const v1, 0x7f0f0ac5

    invoke-static {v0, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    iget-boolean v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectedStroke:Z

    const/4 v2, 0x1

    invoke-direct {p0, v2, v0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->buttonForText(ZLjava/lang/String;Z)Landroid/widget/FrameLayout;

    move-result-object v0

    .line 1092
    .local v0, "outline":Landroid/view/View;
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v1, v0}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->addView(Landroid/view/View;)V

    .line 1094
    invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 1095
    .local v1, "layoutParams":Landroid/widget/LinearLayout$LayoutParams;
    const/4 v3, -0x1

    iput v3, v1, Landroid/widget/LinearLayout$LayoutParams;->width:I

    .line 1096
    const/high16 v4, 0x42400000    # 48.0f

    invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    iput v5, v1, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 1097
    invoke-virtual {v0, v1}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 1099
    const-string v5, "PaintRegular"

    const v6, 0x7f0f0ac6

    invoke-static {v5, v6}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v5

    iget-boolean v6, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectedStroke:Z

    xor-int/2addr v2, v6

    const/4 v6, 0x0

    invoke-direct {p0, v6, v5, v2}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->buttonForText(ZLjava/lang/String;Z)Landroid/widget/FrameLayout;

    move-result-object v2

    .line 1100
    .local v2, "regular":Landroid/view/View;
    iget-object v5, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->popupLayout:Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;

    invoke-virtual {v5, v2}, Lim/tpelyyftgw/ui/actionbar/ActionBarPopupWindow$ActionBarPopupWindowLayout;->addView(Landroid/view/View;)V

    .line 1102
    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v5

    move-object v1, v5

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 1103
    iput v3, v1, Landroid/widget/LinearLayout$LayoutParams;->width:I

    .line 1104
    invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    iput v3, v1, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 1105
    invoke-virtual {v2, v1}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 1106
    return-void
.end method

.method public maybeShowDismissalAlert(Lim/tpelyyftgw/ui/PhotoViewer;Landroid/app/Activity;Ljava/lang/Runnable;)V
    .registers 7
    .param p1, "photoViewer"    # Lim/tpelyyftgw/ui/PhotoViewer;
    .param p2, "parentActivity"    # Landroid/app/Activity;
    .param p3, "okRunnable"    # Ljava/lang/Runnable;

    .line 422
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    if-eqz v0, :cond_9

    .line 423
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->closeTextEnter(Z)V

    .line 424
    return-void

    .line 425
    :cond_9
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->pickingSticker:Z

    if-eqz v0, :cond_11

    .line 426
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->closeStickersView()V

    .line 427
    return-void

    .line 430
    :cond_11
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->hasChanges()Z

    move-result v0

    if-eqz v0, :cond_59

    .line 431
    if-nez p2, :cond_1a

    .line 432
    return-void

    .line 434
    :cond_1a
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;

    invoke-direct {v0, p2}, Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 435
    .local v0, "builder":Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;
    const v1, 0x7f0f052e

    const-string v2, "DiscardChanges"

    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;

    .line 436
    const v1, 0x7f0f0141

    const-string v2, "AppName"

    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;

    .line 437
    const v1, 0x7f0f0a5a

    const-string v2, "OK"

    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    new-instance v2, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$P1XIj5uNgsbVX3xsdYmoDpLOuho;

    invoke-direct {v2, p3}, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$P1XIj5uNgsbVX3xsdYmoDpLOuho;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;

    .line 438
    const v1, 0x7f0f02f7

    const-string v2, "Cancel"

    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;

    .line 439
    invoke-virtual {p1, v0}, Lim/tpelyyftgw/ui/PhotoViewer;->showAlertDialog(Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;)V

    .line 440
    .end local v0    # "builder":Lim/tpelyyftgw/ui/actionbar/AlertDialog$Builder;
    goto :goto_5c

    .line 441
    :cond_59
    invoke-interface {p3}, Ljava/lang/Runnable;->run()V

    .line 443
    :goto_5c
    return-void
.end method

.method public onEntityLongClicked(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z
    .registers 3
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 607
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->showMenuForEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)V

    .line 608
    const/4 v0, 0x1

    return v0
.end method

.method public onEntitySelected(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z
    .registers 3
    .param p1, "entityView"    # Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    .line 602
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    move-result v0

    return v0
.end method

.method protected onLayout(ZIIII)V
    .registers 24
    .param p1, "changed"    # Z
    .param p2, "left"    # I
    .param p3, "top"    # I
    .param p4, "right"    # I
    .param p5, "bottom"    # I

    .line 551
    move-object/from16 v0, p0

    sub-int v1, p4, p2

    .line 552
    .local v1, "width":I
    sub-int v2, p5, p3

    .line 554
    .local v2, "height":I
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v5, 0x15

    if-lt v3, v5, :cond_f

    sget v3, Lim/tpelyyftgw/messenger/AndroidUtilities;->statusBarHeight:I

    goto :goto_10

    :cond_f
    const/4 v3, 0x0

    .line 555
    .local v3, "status":I
    :goto_10
    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v5

    .line 556
    .local v5, "actionBarHeight":I
    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v6

    add-int/2addr v6, v3

    .line 560
    .local v6, "actionBarHeight2":I
    sget-object v7, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v7, v7, Landroid/graphics/Point;->y:I

    sub-int/2addr v7, v5

    const/high16 v8, 0x42400000    # 48.0f

    invoke-static {v8}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v9

    sub-int/2addr v7, v9

    .line 561
    .local v7, "maxHeight":I
    iget-object v9, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    if-eqz v9, :cond_52

    .line 562
    invoke-direct/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v9

    if-eqz v9, :cond_36

    iget-object v9, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v9}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v9

    goto :goto_3c

    :cond_36
    iget-object v9, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v9}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v9

    :goto_3c
    int-to-float v9, v9

    .line 563
    .local v9, "bitmapW":F
    invoke-direct/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v10

    if-eqz v10, :cond_4a

    iget-object v10, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v10}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v10

    goto :goto_50

    :cond_4a
    iget-object v10, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v10}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v10

    :goto_50
    int-to-float v10, v10

    .local v10, "bitmapH":F
    goto :goto_5b

    .line 565
    .end local v9    # "bitmapW":F
    .end local v10    # "bitmapH":F
    :cond_52
    int-to-float v9, v1

    .line 566
    .restart local v9    # "bitmapW":F
    sub-int v10, v2, v5

    invoke-static {v8}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v11

    sub-int/2addr v10, v11

    int-to-float v10, v10

    .line 569
    .restart local v10    # "bitmapH":F
    :goto_5b
    int-to-float v11, v1

    .line 570
    .local v11, "renderWidth":F
    mul-float v12, v11, v10

    div-float/2addr v12, v9

    float-to-double v12, v12

    invoke-static {v12, v13}, Ljava/lang/Math;->floor(D)D

    move-result-wide v12

    double-to-float v12, v12

    .line 571
    .local v12, "renderHeight":F
    int-to-float v13, v7

    cmpl-float v13, v12, v13

    if-lez v13, :cond_74

    .line 572
    int-to-float v12, v7

    .line 573
    mul-float v13, v12, v9

    div-float/2addr v13, v10

    float-to-double v13, v13

    invoke-static {v13, v14}, Ljava/lang/Math;->floor(D)D

    move-result-wide v13

    double-to-float v11, v13

    .line 576
    :cond_74
    iget-object v13, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v13}, Lim/tpelyyftgw/ui/components/paint/RenderView;->getMeasuredWidth()I

    move-result v13

    sub-int v13, v1, v13

    div-int/lit8 v13, v13, 0x2

    int-to-double v13, v13

    invoke-static {v13, v14}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v13

    double-to-int v13, v13

    .line 577
    .local v13, "x":I
    sub-int v14, v2, v6

    invoke-static {v8}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v8

    sub-int/2addr v14, v8

    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/RenderView;->getMeasuredHeight()I

    move-result v8

    sub-int/2addr v14, v8

    div-int/lit8 v14, v14, 0x2

    add-int/2addr v14, v6

    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v8

    sub-int/2addr v14, v8

    const/high16 v8, 0x41000000    # 8.0f

    invoke-static {v8}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v8

    add-int/2addr v14, v8

    .line 579
    .local v14, "y":I
    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/RenderView;->getMeasuredWidth()I

    move-result v15

    add-int/2addr v15, v13

    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/RenderView;->getMeasuredHeight()I

    move-result v4

    add-int/2addr v4, v14

    invoke-virtual {v8, v13, v14, v15, v4}, Lim/tpelyyftgw/ui/components/paint/RenderView;->layout(IIII)V

    .line 581
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintingSize:Lim/tpelyyftgw/ui/components/Size;

    iget v4, v4, Lim/tpelyyftgw/ui/components/Size;->width:F

    div-float v4, v11, v4

    .line 582
    .local v4, "scale":F
    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v8, v4}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->setScaleX(F)V

    .line 583
    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v8, v4}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->setScaleY(F)V

    .line 584
    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getMeasuredWidth()I

    move-result v15

    add-int/2addr v15, v13

    move/from16 v16, v4

    .end local v4    # "scale":F
    .local v16, "scale":F
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getMeasuredHeight()I

    move-result v4

    add-int/2addr v4, v14

    invoke-virtual {v8, v13, v14, v15, v4}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->layout(IIII)V

    .line 585
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    invoke-virtual {v4}, Landroid/widget/FrameLayout;->getMeasuredWidth()I

    move-result v8

    iget-object v15, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    invoke-virtual {v15}, Landroid/widget/FrameLayout;->getMeasuredHeight()I

    move-result v15

    add-int/2addr v15, v3

    move/from16 v17, v5

    const/4 v5, 0x0

    .end local v5    # "actionBarHeight":I
    .local v17, "actionBarHeight":I
    invoke-virtual {v4, v5, v3, v8, v15}, Landroid/widget/FrameLayout;->layout(IIII)V

    .line 586
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-virtual {v4}, Landroid/widget/FrameLayout;->getMeasuredWidth()I

    move-result v8

    iget-object v15, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-virtual {v15}, Landroid/widget/FrameLayout;->getMeasuredHeight()I

    move-result v15

    add-int/2addr v15, v3

    invoke-virtual {v4, v5, v3, v8, v15}, Landroid/widget/FrameLayout;->layout(IIII)V

    .line 587
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->getMeasuredWidth()I

    move-result v8

    iget-object v15, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-virtual {v15}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->getMeasuredHeight()I

    move-result v15

    add-int/2addr v15, v6

    invoke-virtual {v4, v5, v6, v8, v15}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->layout(IIII)V

    .line 588
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    invoke-virtual {v4}, Landroid/widget/FrameLayout;->getMeasuredHeight()I

    move-result v8

    sub-int v8, v2, v8

    iget-object v15, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    invoke-virtual {v15}, Landroid/widget/FrameLayout;->getMeasuredWidth()I

    move-result v15

    invoke-virtual {v4, v5, v8, v15, v2}, Landroid/widget/FrameLayout;->layout(IIII)V

    .line 589
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->curtainView:Landroid/widget/FrameLayout;

    invoke-virtual {v4, v5, v5, v1, v7}, Landroid/widget/FrameLayout;->layout(IIII)V

    .line 590
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    if-eqz v4, :cond_130

    .line 591
    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getMeasuredWidth()I

    move-result v8

    iget-object v15, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    invoke-virtual {v15}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getMeasuredHeight()I

    move-result v15

    add-int/2addr v15, v3

    invoke-virtual {v4, v5, v3, v8, v15}, Lim/tpelyyftgw/ui/components/StickerMasksView;->layout(IIII)V

    .line 594
    :cond_130
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    if-eqz v4, :cond_156

    .line 595
    invoke-virtual {v4}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->updateSelectionView()V

    .line 596
    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    iget-object v5, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v5}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getLeft()I

    move-result v5

    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-virtual {v8}, Landroid/widget/FrameLayout;->getLeft()I

    move-result v8

    sub-int/2addr v5, v8

    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    invoke-virtual {v8}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->getTop()I

    move-result v8

    iget-object v15, v0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-virtual {v15}, Landroid/widget/FrameLayout;->getTop()I

    move-result v15

    sub-int/2addr v8, v15

    invoke-virtual {v4, v5, v8}, Lim/tpelyyftgw/ui/components/paint/views/EntityView;->setOffset(II)V

    .line 598
    :cond_156
    return-void
.end method

.method protected onMeasure(II)V
    .registers 16
    .param p1, "widthMeasureSpec"    # I
    .param p2, "heightMeasureSpec"    # I

    .line 514
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    .line 515
    .local v0, "width":I
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v1

    .line 517
    .local v1, "height":I
    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->setMeasuredDimension(II)V

    .line 521
    sget-object v2, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v2, v2, Landroid/graphics/Point;->y:I

    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v3

    sub-int/2addr v2, v3

    .line 522
    .local v2, "fullHeight":I
    const/high16 v3, 0x42400000    # 48.0f

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    sub-int v4, v2, v4

    .line 523
    .local v4, "maxHeight":I
    iget-object v5, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    if-eqz v5, :cond_49

    .line 524
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v5

    if-eqz v5, :cond_2d

    iget-object v5, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v5

    goto :goto_33

    :cond_2d
    iget-object v5, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    :goto_33
    int-to-float v5, v5

    .line 525
    .local v5, "bitmapW":F
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->isSidewardOrientation()Z

    move-result v6

    if-eqz v6, :cond_41

    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v6

    goto :goto_47

    :cond_41
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->bitmapToEdit:Landroid/graphics/Bitmap;

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v6

    :goto_47
    int-to-float v6, v6

    .local v6, "bitmapH":F
    goto :goto_56

    .line 527
    .end local v5    # "bitmapW":F
    .end local v6    # "bitmapH":F
    :cond_49
    int-to-float v5, v0

    .line 528
    .restart local v5    # "bitmapW":F
    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v6

    sub-int v6, v1, v6

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    sub-int/2addr v6, v7

    int-to-float v6, v6

    .line 531
    .restart local v6    # "bitmapH":F
    :goto_56
    int-to-float v7, v0

    .line 532
    .local v7, "renderWidth":F
    mul-float v8, v7, v6

    div-float/2addr v8, v5

    float-to-double v8, v8

    invoke-static {v8, v9}, Ljava/lang/Math;->floor(D)D

    move-result-wide v8

    double-to-float v8, v8

    .line 533
    .local v8, "renderHeight":F
    int-to-float v9, v4

    cmpl-float v9, v8, v9

    if-lez v9, :cond_6f

    .line 534
    int-to-float v8, v4

    .line 535
    mul-float v9, v8, v5

    div-float/2addr v9, v6

    float-to-double v9, v9

    invoke-static {v9, v10}, Ljava/lang/Math;->floor(D)D

    move-result-wide v9

    double-to-float v7, v9

    .line 538
    :cond_6f
    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    float-to-int v10, v7

    const/high16 v11, 0x40000000    # 2.0f

    invoke-static {v10, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v10

    float-to-int v12, v8

    invoke-static {v12, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v12

    invoke-virtual {v9, v10, v12}, Lim/tpelyyftgw/ui/components/paint/RenderView;->measure(II)V

    .line 539
    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    iget-object v10, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintingSize:Lim/tpelyyftgw/ui/components/Size;

    iget v10, v10, Lim/tpelyyftgw/ui/components/Size;->width:F

    float-to-int v10, v10

    invoke-static {v10, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v10

    iget-object v12, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->paintingSize:Lim/tpelyyftgw/ui/components/Size;

    iget v12, v12, Lim/tpelyyftgw/ui/components/Size;->height:F

    float-to-int v12, v12

    invoke-static {v12, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v12

    invoke-virtual {v9, v10, v12}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->measure(II)V

    .line 540
    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->dimView:Landroid/widget/FrameLayout;

    const/high16 v10, -0x80000000

    invoke-static {v4, v10}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v10

    invoke-virtual {v9, p1, v10}, Landroid/widget/FrameLayout;->measure(II)V

    .line 541
    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-static {v4, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v10

    invoke-virtual {v9, p1, v10}, Landroid/widget/FrameLayout;->measure(II)V

    .line 542
    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->colorPicker:Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;

    invoke-static {v0, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v10

    invoke-static {v4, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v12

    invoke-virtual {v9, v10, v12}, Lim/tpelyyftgw/ui/components/paint/views/ColorPicker;->measure(II)V

    .line 543
    iget-object v9, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->toolsView:Landroid/widget/FrameLayout;

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v3

    invoke-static {v3, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v3

    invoke-virtual {v9, p1, v3}, Landroid/widget/FrameLayout;->measure(II)V

    .line 544
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->stickersView:Lim/tpelyyftgw/ui/components/StickerMasksView;

    if-eqz v3, :cond_d4

    .line 545
    sget-object v9, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v9, v9, Landroid/graphics/Point;->y:I

    invoke-static {v9, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v9

    invoke-virtual {v3, p1, v9}, Lim/tpelyyftgw/ui/components/StickerMasksView;->measure(II)V

    .line 547
    :cond_d4
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 4
    .param p1, "event"    # Landroid/view/MotionEvent;

    .line 295
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->currentEntityView:Lim/tpelyyftgw/ui/components/paint/views/EntityView;

    const/4 v1, 0x1

    if-eqz v0, :cond_11

    .line 296
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->editingText:Z

    if-eqz v0, :cond_d

    .line 297
    invoke-virtual {p0, v1}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->closeTextEnter(Z)V

    goto :goto_11

    .line 300
    :cond_d
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectEntity(Lim/tpelyyftgw/ui/components/paint/views/EntityView;)Z

    .line 303
    :cond_11
    :goto_11
    return v1
.end method

.method public shutdown()V
    .registers 3

    .line 352
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->renderView:Lim/tpelyyftgw/ui/components/paint/RenderView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/paint/RenderView;->shutdown()V

    .line 353
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->entitiesView:Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/paint/views/EntitiesContainerView;->setVisibility(I)V

    .line 354
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->selectionContainerView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 356
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoPaintView;->queue:Lim/tpelyyftgw/messenger/DispatchQueue;

    sget-object v1, Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$dc3vxiR-FxisfAbDtbrSTdf04JY;->INSTANCE:Lim/tpelyyftgw/ui/components/-$$Lambda$PhotoPaintView$dc3vxiR-FxisfAbDtbrSTdf04JY;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/messenger/DispatchQueue;->postRunnable(Ljava/lang/Runnable;)V

    .line 362
    return-void
.end method