package fanch.multijeu.common.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

public class Line extends View {

    protected int mColor=0xff000000;

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

    public Line(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onDraw(Canvas canvas) {
        Paint p = new Paint();
        p.setColor(mColor);
        canvas.drawRect(0, 0,
                getRight()-getLeft(),
                getBottom()-getTop(), p);
    }



    public int getColor() {
        return mColor;
    }

    public void setColor(int mColor) {
        this.mColor = mColor;
    }
}
