init 8: Creation méthode afficher ligne
This commit is contained in:
@@ -65,6 +65,16 @@ public class Ligne extends ObjetGraphique{// Hérite de la classe ObjetGraphique
|
|||||||
// On définit l'épaisseur du trait
|
// On définit l'épaisseur du trait
|
||||||
Graphics2D g2D = (Graphics2D) g;
|
Graphics2D g2D = (Graphics2D) g;
|
||||||
g2D.setStroke(new BasicStroke(3.0f));
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user