StyleOptionImageView.java 1.32 KB
package com.bitstrips.imoji.abv3.style;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Path.Direction;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;

public class StyleOptionImageView
  extends AppCompatImageView
{
  final Path a = new Path();
  
  public StyleOptionImageView(Context paramContext)
  {
    super(paramContext);
  }
  
  public StyleOptionImageView(Context paramContext, @Nullable AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
  }
  
  protected void onDraw(Canvas paramCanvas)
  {
    float f = Math.min(paramCanvas.getWidth(), paramCanvas.getHeight());
    paramCanvas.save();
    RectF localRectF = new RectF(0.0F, 0.0F, f, f);
    f /= 2.0F;
    this.a.addRoundRect(localRectF, f, f, Path.Direction.CW);
    paramCanvas.clipPath(this.a);
    super.onDraw(paramCanvas);
    paramCanvas.restore();
  }
  
  public void onMeasure(int paramInt1, int paramInt2)
  {
    super.onMeasure(paramInt2, paramInt2);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/style/StyleOptionImageView.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */