gl.java 4.92 KB
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;

@TargetApi(9)
@RequiresApi(9)
public class gl
  implements gm
{
  final RectF a = new RectF();
  
  private static gv j(gk paramgk)
  {
    return (gv)paramgk.c();
  }
  
  public final float a(gk paramgk)
  {
    return j(paramgk).k;
  }
  
  public void a()
  {
    gv.c = new gv.a()
    {
      public final void a(Canvas paramAnonymousCanvas, RectF paramAnonymousRectF, float paramAnonymousFloat, Paint paramAnonymousPaint)
      {
        float f1 = 2.0F * paramAnonymousFloat;
        float f2 = paramAnonymousRectF.width() - f1 - 1.0F;
        float f3 = paramAnonymousRectF.height();
        if (paramAnonymousFloat >= 1.0F)
        {
          float f4 = paramAnonymousFloat + 0.5F;
          gl.this.a.set(-f4, -f4, f4, f4);
          int i = paramAnonymousCanvas.save();
          paramAnonymousCanvas.translate(paramAnonymousRectF.left + f4, paramAnonymousRectF.top + f4);
          paramAnonymousCanvas.drawArc(gl.this.a, 180.0F, 90.0F, true, paramAnonymousPaint);
          paramAnonymousCanvas.translate(f2, 0.0F);
          paramAnonymousCanvas.rotate(90.0F);
          paramAnonymousCanvas.drawArc(gl.this.a, 180.0F, 90.0F, true, paramAnonymousPaint);
          paramAnonymousCanvas.translate(f3 - f1 - 1.0F, 0.0F);
          paramAnonymousCanvas.rotate(90.0F);
          paramAnonymousCanvas.drawArc(gl.this.a, 180.0F, 90.0F, true, paramAnonymousPaint);
          paramAnonymousCanvas.translate(f2, 0.0F);
          paramAnonymousCanvas.rotate(90.0F);
          paramAnonymousCanvas.drawArc(gl.this.a, 180.0F, 90.0F, true, paramAnonymousPaint);
          paramAnonymousCanvas.restoreToCount(i);
          paramAnonymousCanvas.drawRect(paramAnonymousRectF.left + f4 - 1.0F, paramAnonymousRectF.top, 1.0F + (paramAnonymousRectF.right - f4), paramAnonymousRectF.top + f4, paramAnonymousPaint);
          paramAnonymousCanvas.drawRect(paramAnonymousRectF.left + f4 - 1.0F, paramAnonymousRectF.bottom - f4, 1.0F + (paramAnonymousRectF.right - f4), paramAnonymousRectF.bottom, paramAnonymousPaint);
        }
        paramAnonymousCanvas.drawRect(paramAnonymousRectF.left, paramAnonymousRectF.top + paramAnonymousFloat, paramAnonymousRectF.right, paramAnonymousRectF.bottom - paramAnonymousFloat, paramAnonymousPaint);
      }
    };
  }
  
  public final void a(gk paramgk, float paramFloat)
  {
    gv localgv = j(paramgk);
    if (paramFloat < 0.0F) {
      throw new IllegalArgumentException("Invalid radius " + paramFloat + ". Must be >= 0");
    }
    paramFloat = (int)(0.5F + paramFloat);
    if (localgv.h != paramFloat)
    {
      localgv.h = paramFloat;
      localgv.o = true;
      localgv.invalidateSelf();
    }
    f(paramgk);
  }
  
  public final void a(gk paramgk, Context paramContext, ColorStateList paramColorStateList, float paramFloat1, float paramFloat2, float paramFloat3)
  {
    paramContext = new gv(paramContext.getResources(), paramColorStateList, paramFloat1, paramFloat2, paramFloat3);
    paramContext.a(paramgk.b());
    paramgk.a(paramContext);
    f(paramgk);
  }
  
  public final void a(gk paramgk, @Nullable ColorStateList paramColorStateList)
  {
    paramgk = j(paramgk);
    paramgk.a(paramColorStateList);
    paramgk.invalidateSelf();
  }
  
  public final float b(gk paramgk)
  {
    paramgk = j(paramgk);
    float f1 = Math.max(paramgk.k, paramgk.h + paramgk.b + paramgk.k / 2.0F);
    float f2 = paramgk.k;
    return (paramgk.b + f2) * 2.0F + f1 * 2.0F;
  }
  
  public final void b(gk paramgk, float paramFloat)
  {
    gv localgv = j(paramgk);
    localgv.a(localgv.m, paramFloat);
    f(paramgk);
  }
  
  public final float c(gk paramgk)
  {
    paramgk = j(paramgk);
    float f1 = Math.max(paramgk.k, paramgk.h + paramgk.b + paramgk.k * 1.5F / 2.0F);
    float f2 = paramgk.k;
    return (paramgk.b + f2 * 1.5F) * 2.0F + f1 * 2.0F;
  }
  
  public final void c(gk paramgk, float paramFloat)
  {
    paramgk = j(paramgk);
    paramgk.a(paramFloat, paramgk.k);
  }
  
  public final float d(gk paramgk)
  {
    return j(paramgk).h;
  }
  
  public final float e(gk paramgk)
  {
    return j(paramgk).m;
  }
  
  public final void f(gk paramgk)
  {
    Rect localRect = new Rect();
    j(paramgk).getPadding(localRect);
    paramgk.a((int)Math.ceil(b(paramgk)), (int)Math.ceil(c(paramgk)));
    paramgk.a(localRect.left, localRect.top, localRect.right, localRect.bottom);
  }
  
  public final void g(gk paramgk) {}
  
  public final void h(gk paramgk)
  {
    j(paramgk).a(paramgk.b());
    f(paramgk);
  }
  
  public final ColorStateList i(gk paramgk)
  {
    return j(paramgk).n;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/gl.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */