1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
public void onDraw(Canvas canvas)
{
maBiblio.desinnerCroix((this.centreX/4)*3,(this.centreY/4), canvas);
}
//DesinnerCroix se trouve dans une autre classe
class biblio
{
private float centreX; //on recupere le centre du canvas quand on construit l'object maBiblio.
private float centreY;
public void desinnerCroix(float x, float Y, Canvas canvas)
{
canvas.drawLine(this.centreX+4+x, this.centreY+4-y, this.centreX-4+x, this.centreY-4-y, couleur.vert);
canvas.drawLine(this.centreX+4+x, this.centreY-4-y, this.centreX-4+x, this.centreY+4-y, couleur.vert);
}
} |
Partager