.class public Lcom/moji/mjweather/aqi/widget/AqiWarnView;
.super Landroid/view/View;
.source "AqiWarnView.java"


# instance fields
.field private A:I

.field private B:Ljava/lang/String;

.field private C:I

.field private D:I

.field private a:Landroid/graphics/Paint;

.field private b:I

.field private c:I

.field private final d:[I

.field private e:[I

.field private f:I

.field private g:I

.field private h:F

.field private i:I

.field private j:Landroid/graphics/Paint;

.field private k:I

.field private l:F

.field private m:I

.field private n:I

.field private o:I

.field private p:Landroid/graphics/Paint;

.field private q:Landroid/graphics/RectF;

.field private r:I

.field private s:Landroid/graphics/Path;

.field private t:I

.field private u:I

.field private v:F

.field private w:I

.field private x:I

.field private y:F

.field private z:F


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 164
    invoke-direct {p0, p1, v0}, Lcom/moji/mjweather/aqi/widget/AqiWarnView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    const/4 v0, 0x0

    .line 168
    invoke-direct {p0, p1, p2, v0}, Lcom/moji/mjweather/aqi/widget/AqiWarnView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .line 172
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x6

    .line 31
    new-array p1, p1, [I

    fill-array-data p1, :array_0

    iput-object p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->d:[I

    const/4 p1, 0x1

    .line 50
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->u:I

    const/high16 p1, 0x42480000    # 50.0f

    .line 51
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    .line 173
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->a()V

    return-void

    :array_0
    .array-data 4
        -0xda4e7b
        -0x123bbc
        -0xd61d1
        -0x16a1a2
        -0x66a646
        -0x74d2b9
    .end array-data
.end method

.method private a()V
    .locals 4

    const v0, 0x7f07004a

    .line 63
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(I)F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->c:I

    .line 64
    new-instance v0, Landroid/graphics/Paint;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->a:Landroid/graphics/Paint;

    const/high16 v0, 0x40800000    # 4.0f

    .line 65
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->f:I

    .line 66
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->f:I

    shr-int/2addr v0, v1

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->g:I

    .line 67
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->c:I

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->g:I

    sub-int/2addr v0, v2

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->i:I

    .line 68
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->a:Landroid/graphics/Paint;

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->f:I

    int-to-float v2, v2

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    const/high16 v0, 0x41c80000    # 25.0f

    .line 69
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    .line 70
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    const/high16 v0, 0x41100000    # 9.0f

    .line 71
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->C:I

    .line 72
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->C:I

    int-to-float v0, v0

    const/high16 v2, 0x40000000    # 2.0f

    div-float/2addr v0, v2

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->l:F

    .line 74
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->C:I

    int-to-float v3, v3

    invoke-virtual {v0, v3}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 75
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    const v3, -0x666667

    invoke-virtual {v0, v3}, Landroid/graphics/Paint;->setColor(I)V

    .line 76
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->c:I

    const/high16 v3, 0x40e00000    # 7.0f

    invoke-static {v3}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v3

    sub-int/2addr v0, v3

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->k:I

    const/high16 v0, 0x42180000    # 38.0f

    .line 78
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v3

    iput v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->m:I

    .line 79
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    int-to-float v0, v0

    div-float/2addr v0, v2

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->z:F

    const/high16 v0, 0x41a00000    # 20.0f

    .line 80
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->n:I

    .line 81
    invoke-static {v2}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->o:I

    .line 82
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->p:Landroid/graphics/Paint;

    .line 83
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->p:Landroid/graphics/Paint;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->d:[I

    const/4 v2, 0x0

    aget v1, v1, v2

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    const/high16 v0, 0x41600000    # 14.0f

    .line 84
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->r:I

    .line 85
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    .line 88
    new-instance v0, Landroid/graphics/Path;

    invoke-direct {v0}, Landroid/graphics/Path;-><init>()V

    iput-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->s:Landroid/graphics/Path;

    const/high16 v0, 0x40c00000    # 6.0f

    .line 89
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->t:I

    return-void
.end method

.method private b()V
    .locals 5

    .line 139
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    iget-object v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

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

    aget v1, v1, v2

    int-to-float v1, v1

    cmpl-float v0, v0, v1

    if-lez v0, :cond_0

    .line 140
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->b:I

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    sub-int/2addr v0, v1

    int-to-float v0, v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    .line 141
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->p:Landroid/graphics/Paint;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->d:[I

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

    add-int/lit8 v2, v2, -0x2

    aget v1, v1, v2

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    goto :goto_1

    :cond_0
    const/4 v0, 0x0

    .line 143
    :goto_0
    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

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

    if-ge v0, v1, :cond_2

    .line 144
    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    aget v2, v2, v0

    int-to-float v2, v2

    cmpl-float v1, v1, v2

    if-lez v1, :cond_1

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    int-to-float v2, v2

    cmpg-float v1, v1, v2

    if-gtz v1, :cond_1

    int-to-float v1, v0

    .line 145
    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->h:F

    mul-float v1, v1, v2

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    iget-object v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    aget v4, v4, v0

    int-to-float v4, v4

    sub-float/2addr v2, v4

    iget-object v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    aget v3, v4, v3

    iget-object v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    aget v4, v4, v0

    sub-int/2addr v3, v4

    int-to-float v3, v3

    div-float/2addr v2, v3

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->h:F

    mul-float v2, v2, v3

    add-float/2addr v1, v2

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    int-to-float v2, v2

    add-float/2addr v1, v2

    iput v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    .line 146
    iget-object v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->p:Landroid/graphics/Paint;

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->d:[I

    aget v0, v2, v0

    invoke-virtual {v1, v0}, Landroid/graphics/Paint;->setColor(I)V

    goto :goto_1

    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_2
    :goto_1
    return-void
.end method


# virtual methods
.method public a(F[ILjava/lang/String;I)V
    .locals 0

    if-nez p2, :cond_0

    return-void

    .line 155
    :cond_0
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    .line 156
    iput-object p3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->B:Ljava/lang/String;

    .line 157
    iput-object p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    .line 158
    iput p4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->D:I

    .line 159
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->invalidate()V

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 10

    .line 94
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 97
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->C:I

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 98
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    const v1, -0x666667

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    const-string v0, "0"

    .line 99
    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    add-int/lit8 v1, v1, 0x0

    int-to-float v1, v1

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->k:I

    int-to-float v2, v2

    iget-object v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 100
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    const/4 v0, 0x1

    const/4 v1, 0x1

    .line 101
    :goto_0
    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

    if-ge v1, v2, :cond_1

    .line 102
    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->a:Landroid/graphics/Paint;

    iget-object v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->d:[I

    add-int/lit8 v4, v1, -0x1

    aget v3, v3, v4

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColor(I)V

    int-to-float v2, v4

    .line 103
    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->h:F

    mul-float v2, v2, v3

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    int-to-float v3, v3

    add-float/2addr v2, v3

    .line 104
    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->i:I

    int-to-float v6, v3

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->h:F

    add-float v7, v2, v3

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->i:I

    int-to-float v8, v3

    iget-object v9, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->a:Landroid/graphics/Paint;

    move-object v4, p1

    move v5, v2

    invoke-virtual/range {v4 .. v9}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 105
    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

    sub-int/2addr v3, v0

    if-ne v1, v3, :cond_0

    .line 106
    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    sget-object v3, Landroid/graphics/Paint$Align;->RIGHT:Landroid/graphics/Paint$Align;

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 107
    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    aget v2, v2, v1

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->b:I

    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    sub-int/2addr v3, v4

    int-to-float v3, v3

    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->k:I

    int-to-float v4, v4

    iget-object v5, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    invoke-virtual {p1, v2, v3, v4, v5}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    goto :goto_1

    .line 109
    :cond_0
    iget-object v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    aget v3, v3, v1

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->h:F

    add-float/2addr v2, v4

    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->k:I

    int-to-float v4, v4

    iget-object v5, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    invoke-virtual {p1, v3, v2, v4, v5}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 114
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->z:F

    sub-float/2addr v1, v2

    const/4 v2, 0x0

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->z:F

    add-float/2addr v3, v4

    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->n:I

    add-int/lit8 v4, v4, 0x0

    int-to-float v4, v4

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/RectF;->set(FFFF)V

    .line 116
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->o:I

    int-to-float v1, v1

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->o:I

    int-to-float v2, v2

    iget-object v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->p:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 118
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->s:Landroid/graphics/Path;

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->t:I

    int-to-float v2, v2

    sub-float/2addr v1, v2

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v2, v2, Landroid/graphics/RectF;->bottom:F

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->moveTo(FF)V

    .line 119
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->s:Landroid/graphics/Path;

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v2, v2, Landroid/graphics/RectF;->bottom:F

    iget v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->t:I

    int-to-float v3, v3

    add-float/2addr v2, v3

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->lineTo(FF)V

    .line 120
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->s:Landroid/graphics/Path;

    iget v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->t:I

    int-to-float v2, v2

    add-float/2addr v1, v2

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v2, v2, Landroid/graphics/RectF;->bottom:F

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->lineTo(FF)V

    .line 121
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->s:Landroid/graphics/Path;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->p:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 122
    invoke-static {}, Lcom/moji/base/AqiValueProvider;->a()Z

    move-result v0

    const/high16 v1, 0x40000000    # 2.0f

    if-eqz v0, :cond_2

    .line 123
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->D:I

    invoke-static {v0}, Lcom/moji/base/AqiValueProvider;->d(I)I

    move-result v0

    .line 124
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-static {v2, v0}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

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

    move-result v2

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

    move-result v3

    .line 127
    iget v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    int-to-float v2, v2

    div-float/2addr v2, v1

    sub-float/2addr v4, v2

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->n:I

    sub-int/2addr v2, v3

    int-to-float v2, v2

    div-float/2addr v2, v1

    const/4 v1, 0x0

    invoke-virtual {p1, v0, v4, v2, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    goto :goto_2

    .line 130
    :cond_2
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    const/4 v2, -0x1

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 131
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->r:I

    int-to-float v2, v2

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 132
    iget v0, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->n:I

    int-to-float v0, v0

    div-float/2addr v0, v1

    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    invoke-virtual {v2}, Landroid/graphics/Paint;->descent()F

    move-result v2

    iget-object v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    invoke-virtual {v3}, Landroid/graphics/Paint;->ascent()F

    move-result v3

    add-float/2addr v2, v3

    div-float/2addr v2, v1

    sub-float/2addr v0, v2

    float-to-int v0, v0

    .line 133
    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    sget-object v3, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 134
    iget-object v2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->B:Ljava/lang/String;

    iget-object v3, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v3, v3, Landroid/graphics/RectF;->left:F

    iget-object v4, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->q:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    add-float/2addr v3, v4

    div-float/2addr v3, v1

    int-to-float v0, v0

    iget-object v1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->j:Landroid/graphics/Paint;

    invoke-virtual {p1, v2, v3, v0, v1}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    :goto_2
    return-void
.end method

.method protected onSizeChanged(IIII)V
    .locals 0

    .line 179
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->b:I

    .line 180
    iput p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->c:I

    .line 182
    iget-object p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    if-nez p1, :cond_0

    return-void

    .line 183
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    array-length p1, p1

    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

    .line 184
    iget p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->b:I

    int-to-float p1, p1

    iget p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->A:I

    int-to-float p2, p2

    const/high16 p3, 0x40000000    # 2.0f

    mul-float p2, p2, p3

    sub-float/2addr p1, p2

    iget p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

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

    int-to-float p2, p2

    div-float/2addr p1, p2

    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->h:F

    .line 185
    iget-object p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->e:[I

    iget p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->w:I

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

    aget p1, p1, p2

    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->x:I

    .line 186
    iget p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->v:F

    iget p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->x:I

    int-to-float p2, p2

    div-float/2addr p1, p2

    iget p2, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->b:I

    int-to-float p2, p2

    mul-float p1, p1, p2

    iput p1, p0, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->y:F

    .line 187
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/widget/AqiWarnView;->b()V

    return-void
.end method
