init 8: Creation méthode afficher ligne

This commit is contained in:
2026-02-05 14:10:01 +01:00
parent 639d6cb41f
commit 84e1703429

View File

@@ -65,6 +65,16 @@ public class Ligne extends ObjetGraphique{// Hérite de la classe ObjetGraphique
// On définit l'épaisseur du trait
Graphics2D g2D = (Graphics2D) g;
g2D.setStroke(new BasicStroke(3.0f));
for(Segment s: this.listeSegments){
s.Afficher(g);
if(SegCourant == null){
if( (xCercle >= s.x) && ( xCercle <= (s.x + s.xLong) ) ){
this.SegCourant = s;
}else{
// Fin itération : rien ne se passe
}
}
}
}