AxisRenderer.smali
.class public abstract Lcom/github/mikephil/charting/renderer/AxisRenderer;
.super Lcom/github/mikephil/charting/renderer/Renderer;
# instance fields
.field protected b:Lcom/github/mikephil/charting/components/AxisBase;
.field protected c:Lcom/github/mikephil/charting/utils/Transformer;
.field protected d:Landroid/graphics/Paint;
.field protected e:Landroid/graphics/Paint;
.field protected f:Landroid/graphics/Paint;
.field protected g:Landroid/graphics/Paint;
# direct methods
.method public constructor <init>(Lcom/github/mikephil/charting/utils/ViewPortHandler;Lcom/github/mikephil/charting/utils/Transformer;Lcom/github/mikephil/charting/components/AxisBase;)V
.registers 5
invoke-direct {p0, p1}, Lcom/github/mikephil/charting/renderer/Renderer;-><init>(Lcom/github/mikephil/charting/utils/ViewPortHandler;)V
iput-object p2, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->c:Lcom/github/mikephil/charting/utils/Transformer;
iput-object p3, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
if-eqz p1, :cond_59
new-instance p1, Landroid/graphics/Paint;
const/4 p2, 0x1
invoke-direct {p1, p2}, Landroid/graphics/Paint;-><init>(I)V
iput-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->e:Landroid/graphics/Paint;
new-instance p1, Landroid/graphics/Paint;
invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V
iput-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->d:Landroid/graphics/Paint;
const p3, -0x777778
invoke-virtual {p1, p3}, Landroid/graphics/Paint;->setColor(I)V
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->d:Landroid/graphics/Paint;
const/high16 p3, 0x3f800000 # 1.0f
invoke-virtual {p1, p3}, Landroid/graphics/Paint;->setStrokeWidth(F)V
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->d:Landroid/graphics/Paint;
sget-object v0, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {p1, v0}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->d:Landroid/graphics/Paint;
const/16 v0, 0x5a
invoke-virtual {p1, v0}, Landroid/graphics/Paint;->setAlpha(I)V
new-instance p1, Landroid/graphics/Paint;
invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V
iput-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->f:Landroid/graphics/Paint;
const/high16 v0, -0x1000000
invoke-virtual {p1, v0}, Landroid/graphics/Paint;->setColor(I)V
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->f:Landroid/graphics/Paint;
invoke-virtual {p1, p3}, Landroid/graphics/Paint;->setStrokeWidth(F)V
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->f:Landroid/graphics/Paint;
sget-object p3, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {p1, p3}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
new-instance p1, Landroid/graphics/Paint;
invoke-direct {p1, p2}, Landroid/graphics/Paint;-><init>(I)V
iput-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->g:Landroid/graphics/Paint;
sget-object p2, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
:cond_59
return-void
.end method
# virtual methods
.method public a(FFZ)V
.registers 6
iget-object v0, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
if-eqz v0, :cond_50
invoke-virtual {v0}, Lcom/github/mikephil/charting/utils/ViewPortHandler;->e()F
move-result v0
const/high16 v1, 0x41200000 # 10.0f
cmpl-float v0, v0, v1
if-lez v0, :cond_50
iget-object v0, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
invoke-virtual {v0}, Lcom/github/mikephil/charting/utils/ViewPortHandler;->l()Z
move-result v0
if-nez v0, :cond_50
iget-object p1, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->c:Lcom/github/mikephil/charting/utils/Transformer;
iget-object p2, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
invoke-virtual {p2}, Lcom/github/mikephil/charting/utils/ViewPortHandler;->b()F
move-result p2
iget-object v0, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
invoke-virtual {v0}, Lcom/github/mikephil/charting/utils/ViewPortHandler;->d()F
move-result v0
invoke-virtual {p1, p2, v0}, Lcom/github/mikephil/charting/utils/Transformer;->a(FF)Lcom/github/mikephil/charting/utils/MPPointD;
move-result-object p1
iget-object p2, p0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->c:Lcom/github/mikephil/charting/utils/Transformer;
iget-object v0, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
invoke-virtual {v0}, Lcom/github/mikephil/charting/utils/ViewPortHandler;->b()F
move-result v0
iget-object v1, p0, Lcom/github/mikephil/charting/renderer/Renderer;->a:Lcom/github/mikephil/charting/utils/ViewPortHandler;
invoke-virtual {v1}, Lcom/github/mikephil/charting/utils/ViewPortHandler;->a()F
move-result v1
invoke-virtual {p2, v0, v1}, Lcom/github/mikephil/charting/utils/Transformer;->a(FF)Lcom/github/mikephil/charting/utils/MPPointD;
move-result-object p2
if-nez p3, :cond_42
iget-wide v0, p2, Lcom/github/mikephil/charting/utils/MPPointD;->d:D
double-to-float p3, v0
iget-wide v0, p1, Lcom/github/mikephil/charting/utils/MPPointD;->d:D
goto :goto_47
:cond_42
iget-wide v0, p1, Lcom/github/mikephil/charting/utils/MPPointD;->d:D
double-to-float p3, v0
iget-wide v0, p2, Lcom/github/mikephil/charting/utils/MPPointD;->d:D
:goto_47
double-to-float v0, v0
invoke-static {p1}, Lcom/github/mikephil/charting/utils/MPPointD;->b(Lcom/github/mikephil/charting/utils/MPPointD;)V
invoke-static {p2}, Lcom/github/mikephil/charting/utils/MPPointD;->b(Lcom/github/mikephil/charting/utils/MPPointD;)V
move p1, p3
move p2, v0
:cond_50
invoke-virtual {p0, p1, p2}, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b(FF)V
return-void
.end method
.method protected b(FF)V
.registers 18
move-object v0, p0
move/from16 v1, p1
move/from16 v2, p2
iget-object v3, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v3}, Lcom/github/mikephil/charting/components/AxisBase;->k()I
move-result v3
sub-float v4, v2, v1
invoke-static {v4}, Ljava/lang/Math;->abs(F)F
move-result v4
float-to-double v4, v4
if-eqz v3, :cond_12d
const-wide/16 v7, 0x0
cmpg-double v9, v4, v7
if-lez v9, :cond_12d
invoke-static {v4, v5}, Ljava/lang/Double;->isInfinite(D)Z
move-result v9
if-eqz v9, :cond_22
goto/16 :goto_12d
:cond_22
int-to-double v9, v3
div-double v9, v4, v9
invoke-static {v9, v10}, Lcom/github/mikephil/charting/utils/Utils;->w(D)F
move-result v9
float-to-double v9, v9
iget-object v11, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v11}, Lcom/github/mikephil/charting/components/AxisBase;->s()Z
move-result v11
if-eqz v11, :cond_44
iget-object v11, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v11}, Lcom/github/mikephil/charting/components/AxisBase;->j()F
move-result v11
float-to-double v11, v11
cmpg-double v13, v9, v11
if-gez v13, :cond_44
iget-object v9, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v9}, Lcom/github/mikephil/charting/components/AxisBase;->j()F
move-result v9
float-to-double v9, v9
:cond_44
invoke-static {v9, v10}, Ljava/lang/Math;->log10(D)D
move-result-wide v11
double-to-int v11, v11
int-to-double v11, v11
const-wide/high16 v13, 0x4024000000000000L # 10.0
invoke-static {v13, v14, v11, v12}, Ljava/lang/Math;->pow(DD)D
move-result-wide v11
invoke-static {v11, v12}, Lcom/github/mikephil/charting/utils/Utils;->w(D)F
move-result v11
float-to-double v11, v11
div-double v6, v9, v11
double-to-int v6, v6
const/4 v7, 0x5
if-le v6, v7, :cond_61
mul-double v11, v11, v13
invoke-static {v11, v12}, Ljava/lang/Math;->floor(D)D
move-result-wide v9
:cond_61
iget-object v6, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v6}, Lcom/github/mikephil/charting/components/AxisBase;->o()Z
move-result v6
iget-object v7, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v7}, Lcom/github/mikephil/charting/components/AxisBase;->r()Z
move-result v7
if-eqz v7, :cond_91
double-to-float v2, v4
add-int/lit8 v4, v3, -0x1
int-to-float v4, v4
div-float/2addr v2, v4
float-to-double v9, v2
iget-object v2, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iput v3, v2, Lcom/github/mikephil/charting/components/AxisBase;->j:I
iget-object v4, v2, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
array-length v4, v4
if-ge v4, v3, :cond_82
new-array v4, v3, [F
iput-object v4, v2, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
:cond_82
const/4 v2, 0x0
:goto_83
if-ge v2, v3, :cond_ea
iget-object v4, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iget-object v4, v4, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
aput v1, v4, v2
float-to-double v4, v1
add-double/2addr v4, v9
double-to-float v1, v4
add-int/lit8 v2, v2, 0x1
goto :goto_83
:cond_91
const-wide/16 v3, 0x0
cmpl-double v5, v9, v3
if-nez v5, :cond_9a
const-wide/16 v3, 0x0
goto :goto_a2
:cond_9a
float-to-double v3, v1
div-double/2addr v3, v9
invoke-static {v3, v4}, Ljava/lang/Math;->ceil(D)D
move-result-wide v3
mul-double v3, v3, v9
:goto_a2
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v1}, Lcom/github/mikephil/charting/components/AxisBase;->o()Z
move-result v1
if-eqz v1, :cond_ab
sub-double/2addr v3, v9
:cond_ab
if-nez v5, :cond_b0
const-wide/16 v1, 0x0
goto :goto_bc
:cond_b0
float-to-double v1, v2
div-double/2addr v1, v9
invoke-static {v1, v2}, Ljava/lang/Math;->floor(D)D
move-result-wide v1
mul-double v1, v1, v9
invoke-static {v1, v2}, Lcom/github/mikephil/charting/utils/Utils;->u(D)D
move-result-wide v1
:goto_bc
if-eqz v5, :cond_c7
move-wide v7, v3
:goto_bf
cmpg-double v5, v7, v1
if-gtz v5, :cond_c7
add-int/lit8 v6, v6, 0x1
add-double/2addr v7, v9
goto :goto_bf
:cond_c7
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iput v6, v1, Lcom/github/mikephil/charting/components/AxisBase;->j:I
iget-object v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
array-length v2, v2
if-ge v2, v6, :cond_d4
new-array v2, v6, [F
iput-object v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
:cond_d4
const/4 v1, 0x0
:goto_d5
if-ge v1, v6, :cond_e9
const-wide/16 v7, 0x0
cmpl-double v2, v3, v7
if-nez v2, :cond_de
move-wide v3, v7
:cond_de
iget-object v2, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iget-object v2, v2, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
double-to-float v5, v3
aput v5, v2, v1
add-double/2addr v3, v9
add-int/lit8 v1, v1, 0x1
goto :goto_d5
:cond_e9
move v3, v6
:cond_ea
const-wide/high16 v1, 0x3ff0000000000000L # 1.0
cmpg-double v4, v9, v1
if-gez v4, :cond_ff
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-static {v9, v10}, Ljava/lang/Math;->log10(D)D
move-result-wide v4
neg-double v4, v4
invoke-static {v4, v5}, Ljava/lang/Math;->ceil(D)D
move-result-wide v4
double-to-int v2, v4
iput v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->k:I
goto :goto_104
:cond_ff
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
const/4 v2, 0x0
iput v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->k:I
:goto_104
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
invoke-virtual {v1}, Lcom/github/mikephil/charting/components/AxisBase;->o()Z
move-result v1
if-eqz v1, :cond_12c
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iget-object v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->i:[F
array-length v2, v2
if-ge v2, v3, :cond_117
new-array v2, v3, [F
iput-object v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->i:[F
:cond_117
double-to-float v1, v9
const/high16 v2, 0x40000000 # 2.0f
div-float/2addr v1, v2
const/4 v6, 0x0
:goto_11c
if-ge v6, v3, :cond_12c
iget-object v2, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
iget-object v4, v2, Lcom/github/mikephil/charting/components/AxisBase;->i:[F
iget-object v2, v2, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
aget v2, v2, v6
add-float/2addr v2, v1
aput v2, v4, v6
add-int/lit8 v6, v6, 0x1
goto :goto_11c
:cond_12c
return-void
:cond_12d
:goto_12d
iget-object v1, v0, Lcom/github/mikephil/charting/renderer/AxisRenderer;->b:Lcom/github/mikephil/charting/components/AxisBase;
const/4 v2, 0x0
new-array v3, v2, [F
iput-object v3, v1, Lcom/github/mikephil/charting/components/AxisBase;->h:[F
new-array v3, v2, [F
iput-object v3, v1, Lcom/github/mikephil/charting/components/AxisBase;->i:[F
iput v2, v1, Lcom/github/mikephil/charting/components/AxisBase;->j:I
return-void
.end method