70 lines
1.9 KiB
Java
70 lines
1.9 KiB
Java
package com.pingan.ai.face.view;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.Canvas;
|
|
import android.graphics.Paint;
|
|
import android.graphics.PorterDuff;
|
|
import android.graphics.PorterDuffXfermode;
|
|
import android.graphics.RectF;
|
|
import android.util.AttributeSet;
|
|
import android.view.View;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class AuroraView extends View {
|
|
public AuroraColorChangeListener auroraColorChangeListener;
|
|
public int color;
|
|
public int cx;
|
|
public int cy;
|
|
public Canvas mCanvas;
|
|
public Bitmap mCircleBmp;
|
|
public Paint mCirclePaint;
|
|
public Paint mPaint;
|
|
public PorterDuffXfermode mPorterDuff;
|
|
public int mRadius;
|
|
public RectF mRectF;
|
|
public Paint mRectPaint;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public interface AuroraColorChangeListener {
|
|
void onDrawColor(int i);
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public native void onDraw(Canvas canvas);
|
|
|
|
public native void setAuroraColorChangeListener(AuroraColorChangeListener auroraColorChangeListener);
|
|
|
|
public native void setAuroraViewColor(int i);
|
|
|
|
public native void setCircleRadius(int i);
|
|
|
|
public native void setCircleXY(int i, int i2);
|
|
|
|
private void init() {
|
|
this.mPaint = new Paint();
|
|
this.mRectPaint = new Paint();
|
|
this.mCirclePaint = new Paint();
|
|
this.mPorterDuff = new PorterDuffXfermode(PorterDuff.Mode.DST_OUT);
|
|
this.mRectF = new RectF();
|
|
}
|
|
|
|
public AuroraView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
this.color = 0;
|
|
init();
|
|
}
|
|
|
|
public AuroraView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
this.color = 0;
|
|
init();
|
|
}
|
|
|
|
public AuroraView(Context context) {
|
|
super(context);
|
|
this.color = 0;
|
|
init();
|
|
}
|
|
}
|