package epson.print;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.view.View;

public class DrawCDLabel extends View implements CommonDefine {
    private Point Center = new Point();
    private float mRadiusIn;
    private float mRadiusOut;
    private int viewHeight;
    private int viewWidth;

    public DrawCDLabel(Context context) {
        super(context);
    }

    public void setRadiusIn(float f) {
        mRadiusIn = f;
    }

    public void setRadiusOut(float f) {
        mRadiusOut = f;
    }

    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        viewWidth = getWidth();
        viewHeight = getHeight();
        Point point = Center;
        point.x = viewWidth / 2;
        point.y = viewHeight / 2;
        Paint paint = new Paint();
        paint.setColor(-1907998);
        canvas.drawCircle((float) Center.x, (float) Center.y, mRadiusIn, paint);
        Path path = new Path();
        path.addCircle((float) Center.x, (float) Center.y, mRadiusOut, Path.Direction.CCW);
        path.setFillType(Path.FillType.INVERSE_WINDING);
        canvas.drawPath(path, paint);
    }
}
