AvatarGenderClipView.java 1.41 KB
package com.bitstrips.imoji.abv3.gender;

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.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.FrameLayout;

public class AvatarGenderClipView
  extends FrameLayout
{
  public AvatarGenderClipView(@NonNull Context paramContext)
  {
    super(paramContext);
  }
  
  public AvatarGenderClipView(@NonNull Context paramContext, @Nullable AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
  }
  
  protected void dispatchDraw(Canvas paramCanvas)
  {
    int i = paramCanvas.getWidth();
    int j = paramCanvas.getHeight();
    float f = i / 2.0F;
    int k = paramCanvas.save();
    Path localPath = new Path();
    RectF localRectF1 = new RectF(0.0F, 0.0F, i, j - f);
    RectF localRectF2 = new RectF(0.0F, j - i, i, j);
    localPath.addRect(localRectF1, Path.Direction.CW);
    localPath.addRoundRect(localRectF2, f, f, Path.Direction.CW);
    paramCanvas.clipPath(localPath);
    super.dispatchDraw(paramCanvas);
    paramCanvas.restoreToCount(k);
  }
}


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