.class public Lcom/moji/mjallergy/view/JerryChartView;
.super Landroid/view/View;
.source "JerryChartView.java"


# instance fields
.field protected a:I

.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/mjallergy/view/ChartData;",
            ">;"
        }
    .end annotation
.end field

.field private c:I

.field private d:I

.field private e:I

.field private f:I

.field private g:F

.field private h:Lcom/moji/mjallergy/view/ChartStyle;

.field private i:I

.field private j:Landroid/graphics/Paint;

.field private k:Landroid/graphics/Paint;

.field private l:Landroid/graphics/Paint;

.field private m:Landroid/graphics/RectF;

.field private n:Landroid/graphics/RectF;

.field private o:I

.field private p:I

.field private q:I


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

    const/4 v0, 0x0

    .line 83
    invoke-direct {p0, p1, v0}, Lcom/moji/mjallergy/view/JerryChartView;-><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

    const/4 v0, 0x0

    .line 87
    invoke-direct {p0, p1, p2, v0}, Lcom/moji/mjallergy/view/JerryChartView;-><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

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

    const/high16 p3, -0x1000000

    .line 33
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->c:I

    const/16 p3, 0x18

    .line 37
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    const/4 p3, -0x1

    .line 42
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->e:I

    const/4 p3, 0x2

    .line 46
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->f:I

    const/16 p3, 0x96

    .line 51
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->a:I

    const/high16 p3, -0x3d4c0000    # -90.0f

    .line 56
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    .line 60
    sget-object p3, Lcom/moji/mjallergy/view/ChartStyle;->FANSHAPE:Lcom/moji/mjallergy/view/ChartStyle;

    iput-object p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    const/16 p3, 0x1e

    .line 68
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->i:I

    const/16 p3, 0x1f4

    .line 78
    iput p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    .line 92
    sget-object p3, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView:[I

    invoke-virtual {p1, p2, p3}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;

    move-result-object p1

    .line 93
    sget p2, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView_pielineColor:I

    iget p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->e:I

    invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result p2

    iput p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->e:I

    .line 94
    sget p2, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView_lineWidth:I

    iget p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->f:I

    invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I

    move-result p2

    iput p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->f:I

    .line 95
    sget p2, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView_startAngle:I

    iget p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getFloat(IF)F

    move-result p2

    iput p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    .line 96
    sget p2, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView_distance:I

    iget p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->i:I

    invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I

    move-result p2

    iput p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->i:I

    .line 97
    sget p2, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView_android_textSize:I

    iget p3, p0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result p2

    iput p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    .line 98
    sget p2, Lpad/aqi/cnemc/com/mjallergymodule/R$styleable;->JerryChartView_chartStyle:I

    const/4 p3, 0x0

    invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result p2

    if-nez p2, :cond_0

    .line 100
    sget-object p2, Lcom/moji/mjallergy/view/ChartStyle;->FANSHAPE:Lcom/moji/mjallergy/view/ChartStyle;

    iput-object p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    goto :goto_0

    .line 102
    :cond_0
    sget-object p2, Lcom/moji/mjallergy/view/ChartStyle;->ANNULAR:Lcom/moji/mjallergy/view/ChartStyle;

    iput-object p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    .line 104
    :goto_0
    invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V

    .line 105
    invoke-direct {p0}, Lcom/moji/mjallergy/view/JerryChartView;->a()V

    return-void
.end method

.method private a(I)I
    .locals 0

    .line 300
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result p1

    return p1
.end method

.method private a()V
    .locals 3

    .line 112
    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/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    .line 113
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

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

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

    .line 114
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    iget v2, p0, Lcom/moji/mjallergy/view/JerryChartView;->a:I

    int-to-float v2, v2

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

    .line 115
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

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

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

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

    iput-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->k:Landroid/graphics/Paint;

    .line 118
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->k:Landroid/graphics/Paint;

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

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

    .line 119
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->k:Landroid/graphics/Paint;

    iget v2, p0, Lcom/moji/mjallergy/view/JerryChartView;->e:I

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

    .line 120
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->k:Landroid/graphics/Paint;

    iget v2, p0, Lcom/moji/mjallergy/view/JerryChartView;->f:I

    int-to-float v2, v2

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

    .line 122
    new-instance v0, Landroid/text/TextPaint;

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

    iput-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->l:Landroid/graphics/Paint;

    .line 123
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->l:Landroid/graphics/Paint;

    iget v1, p0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    int-to-float v1, v1

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

    .line 124
    iget-object v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->k:Landroid/graphics/Paint;

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

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

    return-void
.end method

.method private b(I)I
    .locals 0

    .line 305
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result p1

    return p1
.end method


# virtual methods
.method public a(Ljava/util/List;Lcom/moji/mjallergy/view/ChartStyle;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/moji/mjallergy/view/ChartData;",
            ">;",
            "Lcom/moji/mjallergy/view/ChartStyle;",
            ")V"
        }
    .end annotation

    if-eqz p1, :cond_2

    .line 143
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    .line 147
    :cond_0
    iput-object p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->b:Ljava/util/List;

    if-eqz p2, :cond_1

    .line 149
    iput-object p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    .line 151
    :cond_1
    invoke-virtual {p0}, Lcom/moji/mjallergy/view/JerryChartView;->invalidate()V

    return-void

    :cond_2
    :goto_0
    const-string p1, "TAG"

    const-string p2, "datas is null or datas.size()==0"

    .line 144
    invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 18
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "DrawAllocation"
        }
    .end annotation

    move-object/from16 v0, p0

    move-object/from16 v7, p1

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

    .line 158
    iget-object v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->b:Ljava/util/List;

    if-eqz v1, :cond_8

    iget-object v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->b:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-nez v1, :cond_0

    goto/16 :goto_7

    .line 164
    :cond_0
    sget-object v1, Lcom/moji/mjallergy/view/JerryChartView$1;->a:[I

    iget-object v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    invoke-virtual {v2}, Lcom/moji/mjallergy/view/ChartStyle;->ordinal()I

    move-result v2

    aget v1, v1, v2

    const/4 v8, 0x0

    packed-switch v1, :pswitch_data_0

    const/4 v9, 0x0

    goto :goto_1

    .line 169
    :pswitch_0
    iget v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    int-to-float v1, v1

    const/high16 v2, 0x40a00000    # 5.0f

    mul-float v1, v1, v2

    const/high16 v2, 0x41400000    # 12.0f

    div-float/2addr v1, v2

    goto :goto_0

    .line 166
    :pswitch_1
    iget v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    int-to-float v1, v1

    const/high16 v2, 0x40e00000    # 7.0f

    mul-float v1, v1, v2

    const/high16 v2, 0x41c00000    # 24.0f

    div-float/2addr v1, v2

    :goto_0
    move v9, v1

    :goto_1
    const-string v1, "JerryChartView"

    .line 174
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "textLocation="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v9}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    const/4 v1, 0x0

    const/4 v10, 0x0

    .line 177
    :goto_2
    iget-object v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->b:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v10, v1, :cond_7

    .line 178
    iget-object v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->b:Ljava/util/List;

    invoke-interface {v1, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjallergy/view/ChartData;

    .line 179
    iget-object v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    invoke-virtual {v1}, Lcom/moji/mjallergy/view/ChartData;->a()I

    move-result v3

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

    .line 180
    invoke-virtual {v1}, Lcom/moji/mjallergy/view/ChartData;->b()F

    move-result v2

    const/high16 v3, 0x43b40000    # 360.0f

    mul-float v11, v2, v3

    .line 184
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    const/high16 v4, 0x40000000    # 2.0f

    div-float v5, v11, v4

    add-float/2addr v2, v5

    rem-float/2addr v2, v3

    cmpg-float v5, v2, v8

    if-gtz v5, :cond_1

    add-float/2addr v2, v3

    :cond_1
    float-to-double v5, v2

    .line 190
    invoke-static {v5, v6}, Ljava/lang/Math;->toRadians(D)D

    move-result-wide v12

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

    move-result-wide v12

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

    move-result-wide v12

    double-to-float v12, v12

    .line 191
    invoke-static {v5, v6}, Ljava/lang/Math;->toRadians(D)D

    move-result-wide v5

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

    move-result-wide v5

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

    move-result-wide v5

    double-to-float v5, v5

    .line 198
    iget v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->i:I

    int-to-float v6, v6

    .line 211
    new-instance v13, Ljava/lang/StringBuilder;

    invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1}, Lcom/moji/mjallergy/view/ChartData;->b()F

    move-result v14

    const/high16 v15, 0x42c80000    # 100.0f

    mul-float v14, v14, v15

    float-to-int v14, v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v14, "%"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

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

    move-result-object v13

    .line 213
    iget-object v14, v0, Lcom/moji/mjallergy/view/JerryChartView;->l:Landroid/graphics/Paint;

    invoke-virtual {v14, v13}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v14

    const/high16 v15, 0x42b40000    # 90.0f

    cmpl-float v16, v2, v8

    if-lez v16, :cond_2

    cmpg-float v16, v2, v15

    if-gtz v16, :cond_2

    .line 216
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v3, v12, v6

    add-float/2addr v2, v3

    .line 217
    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v8, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v15, v8

    div-int/lit8 v15, v15, 0x2

    int-to-float v8, v15

    mul-float v6, v6, v5

    add-float/2addr v8, v6

    .line 218
    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v15, v4

    div-int/lit8 v15, v15, 0x2

    int-to-float v4, v15

    add-float/2addr v3, v4

    .line 219
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    add-float/2addr v4, v6

    .line 221
    iget v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    div-int/lit8 v6, v6, 0x2

    int-to-float v6, v6

    mul-float v12, v12, v9

    add-float/2addr v6, v12

    const/high16 v12, 0x40000000    # 2.0f

    div-float/2addr v14, v12

    sub-float/2addr v6, v14

    .line 222
    iget v12, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    div-int/lit8 v12, v12, 0x2

    int-to-float v12, v12

    mul-float v5, v5, v9

    add-float/2addr v12, v5

    iget v5, v0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    div-int/lit8 v5, v5, 0x2

    int-to-float v5, v5

    add-float/2addr v5, v12

    move v14, v5

    move v12, v6

    move/from16 v17, v8

    move v8, v2

    move/from16 v2, v17

    goto/16 :goto_4

    :cond_2
    const/high16 v4, 0x43340000    # 180.0f

    cmpl-float v8, v2, v15

    if-lez v8, :cond_3

    cmpg-float v8, v2, v4

    if-gtz v8, :cond_3

    .line 224
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v3, v12, v6

    sub-float v8, v2, v3

    .line 225
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v4

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v6, v6, v5

    add-float/2addr v2, v6

    .line 226
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    sub-float v3, v4, v3

    .line 227
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    add-float/2addr v4, v6

    .line 229
    iget v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    div-int/lit8 v6, v6, 0x2

    int-to-float v6, v6

    mul-float v12, v12, v9

    sub-float/2addr v6, v12

    const/high16 v12, 0x40000000    # 2.0f

    div-float/2addr v14, v12

    sub-float/2addr v6, v14

    .line 230
    iget v12, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    div-int/lit8 v12, v12, 0x2

    int-to-float v12, v12

    mul-float v5, v5, v9

    add-float/2addr v12, v5

    iget v5, v0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    div-int/lit8 v5, v5, 0x2

    int-to-float v5, v5

    add-float/2addr v5, v12

    :goto_3
    move v14, v5

    move v12, v6

    goto/16 :goto_4

    :cond_3
    const/high16 v8, 0x43870000    # 270.0f

    cmpl-float v4, v2, v4

    if-lez v4, :cond_4

    cmpg-float v4, v2, v8

    if-gtz v4, :cond_4

    .line 232
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v3, v12, v6

    sub-float v8, v2, v3

    .line 233
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v4

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v6, v6, v5

    sub-float/2addr v2, v6

    .line 234
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    sub-float v3, v4, v3

    .line 235
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    sub-float/2addr v4, v6

    .line 237
    iget v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    div-int/lit8 v6, v6, 0x2

    int-to-float v6, v6

    mul-float v12, v12, v9

    sub-float/2addr v6, v12

    const/high16 v12, 0x40000000    # 2.0f

    div-float/2addr v14, v12

    sub-float/2addr v6, v14

    .line 238
    iget v12, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    div-int/lit8 v12, v12, 0x2

    int-to-float v12, v12

    mul-float v5, v5, v9

    sub-float/2addr v12, v5

    iget v5, v0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    div-int/lit8 v5, v5, 0x2

    int-to-float v5, v5

    add-float/2addr v5, v12

    goto :goto_3

    :cond_4
    cmpl-float v4, v2, v8

    if-lez v4, :cond_5

    cmpg-float v2, v2, v3

    if-gtz v2, :cond_5

    .line 240
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v3, v12, v6

    add-float v8, v2, v3

    .line 241
    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v2, v4

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    mul-float v6, v6, v5

    sub-float/2addr v2, v6

    .line 242
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    add-float/2addr v3, v4

    .line 243
    iget v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v15, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v4, v15

    div-int/lit8 v4, v4, 0x2

    int-to-float v4, v4

    sub-float/2addr v4, v6

    .line 245
    iget v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    div-int/lit8 v6, v6, 0x2

    int-to-float v6, v6

    mul-float v12, v12, v9

    add-float/2addr v6, v12

    const/high16 v12, 0x40000000    # 2.0f

    div-float/2addr v14, v12

    sub-float/2addr v6, v14

    .line 246
    iget v12, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    div-int/lit8 v12, v12, 0x2

    int-to-float v12, v12

    mul-float v5, v5, v9

    sub-float/2addr v12, v5

    iget v5, v0, Lcom/moji/mjallergy/view/JerryChartView;->d:I

    div-int/lit8 v5, v5, 0x2

    int-to-float v5, v5

    add-float/2addr v5, v12

    goto/16 :goto_3

    :cond_5
    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v8, 0x0

    const/4 v12, 0x0

    const/4 v14, 0x0

    .line 248
    :goto_4
    iget-object v5, v0, Lcom/moji/mjallergy/view/JerryChartView;->l:Landroid/graphics/Paint;

    invoke-virtual {v1}, Lcom/moji/mjallergy/view/ChartData;->c()I

    move-result v6

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

    .line 250
    iget-object v5, v0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    sget-object v6, Lcom/moji/mjallergy/view/ChartStyle;->FANSHAPE:Lcom/moji/mjallergy/view/ChartStyle;

    if-ne v5, v6, :cond_6

    invoke-virtual {v1}, Lcom/moji/mjallergy/view/ChartData;->d()Z

    move-result v1

    if-eqz v1, :cond_6

    .line 251
    new-instance v5, Landroid/graphics/RectF;

    invoke-direct {v5, v8, v2, v3, v4}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 252
    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    const/4 v6, 0x1

    iget-object v8, v0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    move-object/from16 v1, p1

    move-object v2, v5

    move v4, v11

    move v5, v6

    move-object v6, v8

    invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    .line 254
    iget-object v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->l:Landroid/graphics/Paint;

    invoke-virtual {v7, v13, v12, v14, v1}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    goto :goto_5

    .line 257
    :cond_6
    iget-object v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->m:Landroid/graphics/RectF;

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    const/4 v5, 0x1

    iget-object v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    move-object/from16 v1, p1

    move v4, v11

    invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    .line 263
    :goto_5
    iget-object v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->n:Landroid/graphics/RectF;

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    const/4 v5, 0x1

    iget-object v6, v0, Lcom/moji/mjallergy/view/JerryChartView;->k:Landroid/graphics/Paint;

    move-object/from16 v1, p1

    move v4, v11

    invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    .line 265
    iget v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    add-float/2addr v1, v11

    iput v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->g:F

    add-int/lit8 v10, v10, 0x1

    const/4 v8, 0x0

    goto/16 :goto_2

    .line 268
    :cond_7
    sget-object v1, Lcom/moji/mjallergy/view/JerryChartView$1;->a:[I

    iget-object v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->h:Lcom/moji/mjallergy/view/ChartStyle;

    invoke-virtual {v2}, Lcom/moji/mjallergy/view/ChartStyle;->ordinal()I

    move-result v2

    aget v1, v1, v2

    packed-switch v1, :pswitch_data_1

    goto :goto_6

    .line 273
    :pswitch_2
    iget-object v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->e:I

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

    .line 274
    iget v1, v0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    div-int/lit8 v1, v1, 0x2

    int-to-float v1, v1

    iget v2, v0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    iget v3, v0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    mul-int/lit8 v3, v3, 0x7

    div-int/lit8 v3, v3, 0x18

    int-to-float v3, v3

    iget-object v4, v0, Lcom/moji/mjallergy/view/JerryChartView;->j:Landroid/graphics/Paint;

    invoke-virtual {v7, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    :goto_6
    :pswitch_3
    return-void

    :cond_8
    :goto_7
    const-string v1, "TAG"

    const-string v2, "datas is null or datas.size()==0"

    .line 159
    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch

    :pswitch_data_1
    .packed-switch 0x1
        :pswitch_3
        :pswitch_2
    .end packed-switch
.end method

.method protected onMeasure(II)V
    .locals 4
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "DrawAllocation"
        }
    .end annotation

    .line 288
    invoke-direct {p0, p1}, Lcom/moji/mjallergy/view/JerryChartView;->a(I)I

    move-result p2

    iput p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    .line 289
    invoke-direct {p0, p1}, Lcom/moji/mjallergy/view/JerryChartView;->b(I)I

    move-result p1

    iput p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    .line 291
    iget p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    invoke-virtual {p0, p1, p2}, Lcom/moji/mjallergy/view/JerryChartView;->setMeasuredDimension(II)V

    .line 292
    iget p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->i:I

    mul-int/lit8 p2, p2, 0x2

    sub-int/2addr p1, p2

    iput p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    .line 293
    new-instance p1, Landroid/graphics/RectF;

    iget p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr p2, v0

    div-int/lit8 p2, p2, 0x2

    int-to-float p2, p2

    iget v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v1, p0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    sub-int/2addr v0, v1

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    iget v1, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    iget v2, p0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v1, v2

    div-int/lit8 v1, v1, 0x2

    int-to-float v1, v1

    iget v2, p0, Lcom/moji/mjallergy/view/JerryChartView;->q:I

    iget v3, p0, Lcom/moji/mjallergy/view/JerryChartView;->o:I

    add-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    invoke-direct {p1, p2, v0, v1, v2}, Landroid/graphics/RectF;-><init>(FFFF)V

    iput-object p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->m:Landroid/graphics/RectF;

    .line 295
    new-instance p1, Landroid/graphics/RectF;

    iget p2, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    int-to-float p2, p2

    iget v0, p0, Lcom/moji/mjallergy/view/JerryChartView;->p:I

    int-to-float v0, v0

    const/4 v1, 0x0

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

    iput-object p1, p0, Lcom/moji/mjallergy/view/JerryChartView;->n:Landroid/graphics/RectF;

    return-void
.end method

.method public setData(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/moji/mjallergy/view/ChartData;",
            ">;)V"
        }
    .end annotation

    const/4 v0, 0x0

    .line 133
    invoke-virtual {p0, p1, v0}, Lcom/moji/mjallergy/view/JerryChartView;->a(Ljava/util/List;Lcom/moji/mjallergy/view/ChartStyle;)V

    return-void
.end method
