.class public Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;
.super Ljava/lang/Object;
.source "CurveDrawer.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/dailydetail/utils/CurveDrawer$TYPE;
    }
.end annotation


# static fields
.field public static a:F = 1.0f

.field public static volatile b:Ljava/util/Vector; = null
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector<",
            "Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;",
            ">;"
        }
    .end annotation
.end field

.field public static volatile c:Ljava/util/Vector; = null
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector<",
            "Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;",
            ">;"
        }
    .end annotation
.end field

.field private static d:Z = false

.field private static e:F = 0.0f

.field private static f:F = 0.0f

.field private static g:F = 0.0f

.field private static h:F = 0.0f

.field private static i:F = 0.0f

.field private static j:Landroid/graphics/Paint; = null

.field private static k:Landroid/graphics/Paint; = null

.field private static l:Landroid/graphics/Paint; = null

.field private static m:Landroid/graphics/Paint; = null

.field private static n:Landroid/graphics/Paint; = null

.field private static o:Landroid/graphics/Paint; = null

.field private static p:Landroid/graphics/Path; = null

.field private static q:Landroid/graphics/Path; = null

.field private static r:F = 0.0f

.field private static s:F = 0.0f

.field private static t:I = 0x0

.field private static u:I = 0x7

.field private static v:Landroid/graphics/PaintFlagsDrawFilter;


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

    .line 65
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    sput-object v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    .line 66
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    sput-object v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->c:Ljava/util/Vector;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 22
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private static a(D)I
    .locals 2

    .line 321
    invoke-static {}, Lcom/moji/tool/DeviceTool;->f()F

    move-result v0

    float-to-double v0, v0

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

    mul-double p0, p0, v0

    const-wide/high16 v0, 0x3fe0000000000000L    # 0.5

    add-double/2addr p0, v0

    double-to-int p0, p0

    return p0
.end method

.method public static declared-synchronized a()V
    .locals 9

    const-class v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;

    monitor-enter v0

    const v1, 0x7f070081

    .line 239
    :try_start_0
    invoke-static {v1}, Lcom/moji/tool/DeviceTool;->a(I)F

    move-result v1

    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->r:F

    const v1, 0x7f070086

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

    move-result v1

    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->s:F

    .line 241
    invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I

    move-result v1

    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->t:I

    .line 243
    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->t:I

    const/16 v2, 0x2d0

    const/high16 v3, 0x3f800000    # 1.0f

    const/4 v4, 0x3

    if-le v1, v2, :cond_0

    const/4 v1, 0x5

    .line 244
    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->u:I

    const/high16 v1, 0x3fc00000    # 1.5f

    .line 245
    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a:F

    goto :goto_0

    .line 246
    :cond_0
    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->t:I

    const/16 v2, 0x1e0

    if-le v1, v2, :cond_1

    .line 247
    sput v4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->u:I

    .line 248
    sput v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a:F

    goto :goto_0

    :cond_1
    const/4 v1, 0x2

    .line 250
    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->u:I

    const v1, 0x3f4ccccd    # 0.8f

    .line 251
    sput v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a:F

    .line 253
    :goto_0
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    if-nez v1, :cond_2

    .line 254
    new-instance v1, Landroid/graphics/Path;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    .line 256
    :cond_2
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->p:Landroid/graphics/Path;

    if-nez v1, :cond_3

    .line 257
    new-instance v1, Landroid/graphics/Path;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->p:Landroid/graphics/Path;

    .line 260
    :cond_3
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

    const/16 v2, 0xff

    const v5, 0xffffff

    const/4 v6, 0x1

    if-nez v1, :cond_4

    .line 261
    new-instance v1, Landroid/graphics/Paint;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

    .line 262
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

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

    .line 263
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

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

    .line 264
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

    sget v7, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->u:I

    int-to-float v7, v7

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

    .line 265
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

    sget-object v7, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v7}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 266
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

    invoke-virtual {v1, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 269
    :cond_4
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

    const/16 v7, 0x50

    if-nez v1, :cond_5

    .line 270
    new-instance v1, Landroid/graphics/Paint;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

    .line 271
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

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

    .line 272
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

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

    .line 273
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

    const/high16 v8, 0x40a00000    # 5.0f

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

    .line 274
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

    sget-object v8, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v8}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 275
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

    invoke-virtual {v1, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 278
    :cond_5
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    if-nez v1, :cond_6

    .line 279
    new-instance v1, Landroid/graphics/Paint;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    .line 280
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    invoke-virtual {v1, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 281
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    invoke-virtual {v1, v6}, Landroid/graphics/Paint;->setDither(Z)V

    .line 282
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    sget-object v8, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v8}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 283
    new-instance v1, Landroid/graphics/DashPathEffect;

    const/4 v8, 0x4

    new-array v8, v8, [F

    fill-array-data v8, :array_0

    invoke-direct {v1, v8, v3}, Landroid/graphics/DashPathEffect;-><init>([FF)V

    .line 284
    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    invoke-virtual {v3, v1}, Landroid/graphics/Paint;->setPathEffect(Landroid/graphics/PathEffect;)Landroid/graphics/PathEffect;

    .line 285
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    const/4 v3, -0x1

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

    .line 286
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    const/high16 v3, 0x40000000    # 2.0f

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

    .line 287
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

    const/16 v3, 0x32

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

    .line 290
    :cond_6
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

    if-nez v1, :cond_7

    .line 291
    new-instance v1, Landroid/graphics/Paint;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

    .line 292
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

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

    .line 293
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

    const/16 v3, 0x16

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

    .line 294
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

    sget-object v3, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 295
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

    invoke-virtual {v1, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 298
    :cond_7
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

    if-nez v1, :cond_8

    .line 299
    new-instance v1, Landroid/graphics/Paint;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

    .line 300
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

    sget v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->s:F

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

    .line 301
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

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

    .line 302
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

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

    .line 305
    :cond_8
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

    if-nez v1, :cond_9

    .line 306
    new-instance v1, Landroid/graphics/Paint;

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

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

    .line 307
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

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

    .line 308
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

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

    .line 309
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

    sget v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->r:F

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

    .line 313
    :cond_9
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->v:Landroid/graphics/PaintFlagsDrawFilter;

    if-nez v1, :cond_a

    .line 314
    new-instance v1, Landroid/graphics/PaintFlagsDrawFilter;

    const/4 v2, 0x0

    invoke-direct {v1, v2, v4}, Landroid/graphics/PaintFlagsDrawFilter;-><init>(II)V

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->v:Landroid/graphics/PaintFlagsDrawFilter;

    .line 317
    :cond_a
    sput-boolean v6, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->d:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 318
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 238
    monitor-exit v0

    throw v1

    :array_0
    .array-data 4
        0x40a00000    # 5.0f
        0x40a00000    # 5.0f
        0x40a00000    # 5.0f
        0x40a00000    # 5.0f
    .end array-data
.end method

.method private static a(F)V
    .locals 8

    .line 213
    sget v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->h:F

    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    sub-float/2addr v0, v1

    const/4 v1, 0x3

    int-to-float v1, v1

    div-float/2addr v0, v1

    const/4 v1, 0x0

    :goto_0
    const/4 v2, 0x4

    if-ge v1, v2, :cond_1

    .line 215
    sget v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    int-to-float v3, v1

    mul-float v3, v3, v0

    add-float/2addr v2, v3

    .line 216
    invoke-static {v2}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v3

    add-float/2addr v3, p0

    const-string v4, "TAG_YAXIS"

    if-nez v1, :cond_0

    const-string v4, "TAG_YAXIS_0"

    .line 223
    :cond_0
    new-instance v5, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    const/4 v6, 0x0

    invoke-direct {v5, v6, v3}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;-><init>(FF)V

    .line 224
    invoke-virtual {v5, v4}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->a(Ljava/lang/String;)V

    .line 226
    new-instance v3, Ljava/text/DecimalFormat;

    const-string v4, "#.##"

    invoke-direct {v3, v4}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    float-to-double v6, v2

    .line 227
    invoke-virtual {v3, v6, v7}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v5, v2}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->b(Ljava/lang/String;)V

    .line 228
    sget-object v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    invoke-virtual {v2, v5}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    return-void
.end method

.method public static declared-synchronized a(Landroid/graphics/Canvas;Ljava/util/Vector;FFFFFI)V
    .locals 23
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/graphics/Canvas;",
            "Ljava/util/Vector<",
            "Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;",
            ">;FFFFFI)V"
        }
    .end annotation

    move-object/from16 v7, p0

    move-object/from16 v8, p1

    move/from16 v0, p2

    move/from16 v9, p3

    move/from16 v10, p7

    const-class v11, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;

    monitor-enter v11

    if-eqz v7, :cond_c

    if-eqz v8, :cond_c

    .line 73
    :try_start_0
    invoke-virtual/range {p1 .. p1}, Ljava/util/Vector;->size()I

    move-result v3

    if-eqz v3, :cond_c

    const/4 v12, 0x0

    cmpg-float v3, v0, v12

    if-lez v3, :cond_c

    cmpg-float v3, p5, p4

    if-ltz v3, :cond_c

    cmpg-float v3, v9, v12

    if-gtz v3, :cond_0

    goto/16 :goto_9

    .line 78
    :cond_0
    sput p4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    .line 79
    sput p5, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->h:F

    .line 81
    invoke-virtual/range {p1 .. p1}, Ljava/util/Vector;->size()I

    move-result v13

    .line 83
    invoke-static {}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b()V

    .line 85
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->v:Landroid/graphics/PaintFlagsDrawFilter;

    invoke-virtual {v7, v1}, Landroid/graphics/Canvas;->setDrawFilter(Landroid/graphics/DrawFilter;)V

    .line 87
    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->h:F

    sget v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    sub-float/2addr v1, v2

    const-string v2, "ffgg"

    .line 89
    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

    invoke-static {v2, v3}, Lcom/moji/mjweather/dailydetail/utils/DrawUtil;->a(Ljava/lang/String;Landroid/graphics/Paint;)F

    move-result v2

    .line 94
    invoke-virtual {v7, v12, v12, v0, v9}, Landroid/graphics/Canvas;->clipRect(FFFF)Z

    int-to-float v3, v13

    const v4, 0x3e99999a    # 0.3f

    add-float/2addr v3, v4

    div-float v3, v0, v3

    .line 95
    sput v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->e:F

    const v3, 0x3f4ccccd    # 0.8f

    .line 96
    sget v4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->e:F

    mul-float v4, v4, v3

    sput v4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->i:F

    const-wide/high16 v3, 0x4031000000000000L    # 17.0

    .line 97
    invoke-static {v3, v4}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a(D)I

    move-result v5

    int-to-float v5, v5

    add-float v14, v2, v5

    .line 98
    invoke-static {v3, v4}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a(D)I

    move-result v3

    int-to-float v3, v3

    add-float/2addr v2, v3

    sub-float v3, v9, v14

    sub-float/2addr v3, v2

    div-float/2addr v3, v1

    .line 99
    sput v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->f:F

    .line 101
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    if-nez v1, :cond_1

    .line 102
    new-instance v1, Ljava/util/Vector;

    invoke-direct {v1}, Ljava/util/Vector;-><init>()V

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    goto :goto_0

    .line 104
    :cond_1
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    invoke-virtual {v1}, Ljava/util/Vector;->clear()V

    .line 106
    :goto_0
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->c:Ljava/util/Vector;

    if-nez v1, :cond_2

    .line 107
    new-instance v1, Ljava/util/Vector;

    invoke-direct {v1}, Ljava/util/Vector;-><init>()V

    sput-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->c:Ljava/util/Vector;

    goto :goto_1

    .line 109
    :cond_2
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->c:Ljava/util/Vector;

    invoke-virtual {v1}, Ljava/util/Vector;->clear()V

    .line 112
    :goto_1
    new-instance v1, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    invoke-direct {v1, v12, v0}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;-><init>(FF)V

    const-string v0, "TAG_X_RANGE"

    .line 113
    invoke-virtual {v1, v0}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->a(Ljava/lang/String;)V

    .line 114
    sget-object v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 116
    new-instance v0, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->i:F

    const/high16 v2, 0x3f000000    # 0.5f

    sget v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->e:F

    mul-float v3, v3, v2

    invoke-direct {v0, v1, v3}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;-><init>(FF)V

    const-string v1, "TAG_BEGIN_AND_END_X"

    .line 117
    invoke-virtual {v0, v1}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->a(Ljava/lang/String;)V

    .line 118
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    const v1, -0x38800100    # -65535.0f

    const/4 v15, 0x0

    .line 122
    :try_start_1
    invoke-virtual {v8, v15}, Ljava/util/Vector;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    invoke-virtual {v0}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->c()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v0
    :try_end_1
    .catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_2

    :catch_0
    move-exception v0

    .line 125
    :try_start_2
    invoke-virtual {v0}, Ljava/lang/NumberFormatException;->printStackTrace()V

    const v0, -0x38800100    # -65535.0f

    .line 128
    :goto_2
    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    cmpl-float v1, v0, v1

    if-ltz v1, :cond_3

    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->h:F

    cmpg-float v1, v0, v1

    if-gtz v1, :cond_3

    const-string v1, "TAG_SEA_LEVEL"

    .line 130
    invoke-static {v0}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v0

    add-float/2addr v0, v14

    .line 131
    new-instance v2, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    invoke-direct {v2, v12, v0}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;-><init>(FF)V

    .line 132
    invoke-virtual {v2, v1}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->a(Ljava/lang/String;)V

    .line 133
    sget-object v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b:Ljava/util/Vector;

    invoke-virtual {v0, v2}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 136
    :cond_3
    invoke-static {v14}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a(F)V

    .line 138
    sget v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->i:F

    add-float v0, p6, v0

    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    :goto_3
    if-ge v6, v13, :cond_b

    .line 147
    invoke-virtual {v8, v6}, Ljava/util/Vector;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    .line 148
    invoke-virtual {v1}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->d()F

    move-result v2

    sget v16, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->e:F

    mul-float v2, v2, v16

    add-float/2addr v2, v0

    .line 149
    invoke-virtual {v1}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->e()F

    move-result v16

    invoke-static/range {v16 .. v16}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v16

    add-float v15, v14, v16

    .line 150
    new-instance v12, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    invoke-direct {v12, v2, v15}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;-><init>(FF)V

    move/from16 v17, v13

    .line 151
    sget-object v13, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->c:Ljava/util/Vector;

    invoke-virtual {v13, v12}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    if-ne v10, v6, :cond_4

    move v12, v2

    goto :goto_4

    :cond_4
    move v12, v3

    :goto_4
    if-nez v6, :cond_5

    .line 156
    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    invoke-virtual {v3}, Landroid/graphics/Path;->reset()V

    .line 157
    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

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

    move/from16 v18, v12

    goto :goto_5

    :cond_5
    add-float v3, v2, v4

    const/high16 v13, 0x40000000    # 2.0f

    div-float/2addr v3, v13

    add-float v16, v15, v5

    div-float v13, v16, v13

    move/from16 v18, v12

    .line 165
    sget-object v12, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    invoke-virtual {v12, v4, v5, v3, v13}, Landroid/graphics/Path;->quadTo(FFFF)V

    .line 170
    :goto_5
    invoke-virtual {v1}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->a()Ljava/lang/String;

    move-result-object v12

    .line 171
    invoke-virtual {v1}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->b()Ljava/lang/String;

    move-result-object v13

    .line 172
    invoke-static {v13}, Lcom/moji/skinshop/util/Util;->c(Ljava/lang/String;)Z

    move-result v1

    const/16 v5, 0x50

    const/16 v4, 0xff

    if-eqz v1, :cond_7

    .line 173
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->p:Landroid/graphics/Path;

    invoke-virtual {v1}, Landroid/graphics/Path;->reset()V

    .line 174
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->p:Landroid/graphics/Path;

    sget v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    invoke-static {v3}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v3

    add-float/2addr v3, v14

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

    .line 175
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->p:Landroid/graphics/Path;

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

    .line 176
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->p:Landroid/graphics/Path;

    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->o:Landroid/graphics/Paint;

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

    if-ge v6, v10, :cond_6

    .line 178
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

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

    goto :goto_6

    .line 180
    :cond_6
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

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

    .line 182
    :goto_6
    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->n:Landroid/graphics/Paint;

    sget-object v16, Lcom/moji/mjweather/dailydetail/utils/enumdata/ALIGN_TYPE;->CENTER_BOTTOM:Lcom/moji/mjweather/dailydetail/utils/enumdata/ALIGN_TYPE;

    sget v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    invoke-static {v1}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v1

    add-float v19, v14, v1

    move-object/from16 v1, p0

    move/from16 v20, v2

    move-object v2, v3

    move-object/from16 v3, v16

    move/from16 v21, v15

    const/16 v15, 0xff

    move/from16 v4, v20

    move/from16 v5, v19

    move/from16 v22, v6

    move-object v6, v13

    invoke-static/range {v1 .. v6}, Lcom/moji/mjweather/dailydetail/utils/DrawUtil;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/mjweather/dailydetail/utils/enumdata/ALIGN_TYPE;FFLjava/lang/String;)V

    goto :goto_7

    :cond_7
    move/from16 v20, v2

    move/from16 v22, v6

    move/from16 v21, v15

    const/16 v15, 0xff

    :goto_7
    const/4 v1, -0x1

    if-ne v10, v1, :cond_8

    .line 185
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

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

    move/from16 v13, v22

    goto :goto_8

    :cond_8
    move/from16 v13, v22

    if-nez v13, :cond_9

    .line 188
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

    const/16 v2, 0x50

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

    :cond_9
    if-ne v13, v10, :cond_a

    .line 191
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

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

    .line 194
    :cond_a
    :goto_8
    sget-object v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->m:Landroid/graphics/Paint;

    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/enumdata/ALIGN_TYPE;->CENTER_BOTTOM:Lcom/moji/mjweather/dailydetail/utils/enumdata/ALIGN_TYPE;

    const-wide/high16 v4, 0x4020000000000000L    # 8.0

    invoke-static {v4, v5}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a(D)I

    move-result v1

    int-to-float v1, v1

    sub-float v5, v9, v1

    move-object/from16 v1, p0

    move/from16 v4, v20

    move-object v6, v12

    invoke-static/range {v1 .. v6}, Lcom/moji/mjweather/dailydetail/utils/DrawUtil;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/mjweather/dailydetail/utils/enumdata/ALIGN_TYPE;FFLjava/lang/String;)V

    add-int/lit8 v6, v13, 0x1

    move/from16 v13, v17

    move/from16 v3, v18

    move/from16 v1, v20

    move v4, v1

    move/from16 v2, v21

    move v5, v2

    const/4 v12, 0x0

    const/4 v15, 0x0

    goto/16 :goto_3

    .line 197
    :cond_b
    sget-object v4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

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

    .line 198
    sget-object v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    sget-object v4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->k:Landroid/graphics/Paint;

    invoke-virtual {v7, v2, v4}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 200
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Canvas;->save()I

    .line 201
    sget v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    invoke-static {v2}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v2

    add-float/2addr v2, v14

    const/4 v4, 0x0

    invoke-virtual {v7, v3, v4, v1, v2}, Landroid/graphics/Canvas;->clipRect(FFFF)Z

    .line 202
    sget-object v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->j:Landroid/graphics/Paint;

    invoke-virtual {v7, v2, v3}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 203
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Canvas;->restore()V

    const/4 v2, 0x0

    .line 205
    invoke-virtual {v8, v2}, Ljava/util/Vector;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;

    .line 206
    sget-object v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    sget v4, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    invoke-static {v4}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v4

    add-float/2addr v4, v14

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

    .line 207
    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    invoke-virtual {v2}, Lcom/moji/mjweather/dailydetail/utils/draw/DataPoint;->d()F

    move-result v2

    sget v3, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->e:F

    mul-float v2, v2, v3

    add-float/2addr v0, v2

    sget v2, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->g:F

    invoke-static {v2}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->b(F)F

    move-result v2

    add-float/2addr v14, v2

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

    .line 208
    sget-object v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->q:Landroid/graphics/Path;

    sget-object v1, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->l:Landroid/graphics/Paint;

    invoke-virtual {v7, v0, v1}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 209
    monitor-exit v11

    return-void

    .line 74
    :cond_c
    :goto_9
    :try_start_3
    const-class v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    const-string v1, "Parameter Error in CurveDrawer.draw()!"

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 75
    monitor-exit v11

    return-void

    :catchall_0
    move-exception v0

    .line 72
    monitor-exit v11

    throw v0
.end method

.method private static b(F)F
    .locals 1

    .line 326
    sget v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->h:F

    sub-float/2addr v0, p0

    sget p0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->f:F

    mul-float v0, v0, p0

    return v0
.end method

.method private static b()V
    .locals 1

    .line 233
    sget-boolean v0, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->d:Z

    if-nez v0, :cond_0

    .line 234
    invoke-static {}, Lcom/moji/mjweather/dailydetail/utils/CurveDrawer;->a()V

    :cond_0
    return-void
.end method
