package com.example.myapplication;

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

public class Fenetre extends View {

    private Pois controleur;
    Paint turpentinebleu = new Paint();

    public Fenetre(Context context) {
        super(context);
        this.turpentinebleu.setARGB(255,0,0,255);
    }

    public void setControleur(Pois control){
        this.controleur=control;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        if (this.controleur.getPoisX()==-1 || this.controleur.getPoisY()==-1){
            return;
        }
        canvas.drawCircle(this.controleur.getPoisX(),this.controleur.getPoisY(),20,turpentinebleu);
    }
}
