75 lines
2.7 KiB
Java
75 lines
2.7 KiB
Java
package com.skydoves.balloon.radius;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Canvas;
|
|
import android.graphics.Path;
|
|
import android.graphics.RectF;
|
|
import android.util.AttributeSet;
|
|
import android.widget.FrameLayout;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import o.C14929gcJ;
|
|
import o.C14957gcv;
|
|
import o.InterfaceC14984gdp;
|
|
import o.fMP;
|
|
import o.fMR;
|
|
import o.gcB;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class RadiusLayout extends FrameLayout {
|
|
private static InterfaceC14984gdp<Object>[] e = {C14929gcJ.c(new gcB(RadiusLayout.class, "radius", "getRadius()F"))};
|
|
private final Path a;
|
|
private final fMP d;
|
|
|
|
private /* synthetic */ RadiusLayout(Context context, AttributeSet attributeSet, int i, byte b) {
|
|
this(context, (i & 2) != 0 ? null : attributeSet, 0);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public RadiusLayout(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
C14957gcv.e(context, "");
|
|
this.a = new Path();
|
|
RadiusLayout radiusLayout = this;
|
|
Float valueOf = Float.valueOf(BitmapDescriptorFactory.HUE_RED);
|
|
C14957gcv.e(radiusLayout, "");
|
|
this.d = new fMP(valueOf, new fMR.Sts(radiusLayout));
|
|
}
|
|
|
|
public final void setRadius(float f) {
|
|
this.d.c(e[0], Float.valueOf(f));
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // android.view.View
|
|
protected final void onSizeChanged(int i, int i2, int i3, int i4) {
|
|
super.onSizeChanged(i, i2, i3, i4);
|
|
Path path = this.a;
|
|
RectF rectF = new RectF(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, i, i2);
|
|
fMP fmp = this.d;
|
|
C14957gcv.e(e[0], "");
|
|
float floatValue = ((Number) fmp.d).floatValue();
|
|
fMP fmp2 = this.d;
|
|
C14957gcv.e(e[0], "");
|
|
path.addRoundRect(rectF, floatValue, ((Number) fmp2.d).floatValue(), Path.Direction.CW);
|
|
}
|
|
|
|
@Override // android.view.ViewGroup, android.view.View
|
|
protected final void dispatchDraw(Canvas canvas) {
|
|
C14957gcv.e(canvas, "");
|
|
canvas.clipPath(this.a);
|
|
super.dispatchDraw(canvas);
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
public RadiusLayout(Context context, AttributeSet attributeSet) {
|
|
this(context, attributeSet, 4, (byte) 0);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
public RadiusLayout(Context context) {
|
|
this(context, null, 6, (byte) 0);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
}
|