forked from menault/TD3_DEV51_Qualite_Algo
Event commentaire
This commit is contained in:
@@ -47,8 +47,7 @@ public class Dessin extends JPanel {
|
||||
graphics2D.drawLine(postXCoordinate, marginPixels, postXCoordinate + beamLength, marginPixels);
|
||||
|
||||
// Renfort diagonal
|
||||
graphics2D.drawLine(postXCoordinate, marginPixels + height / 10,
|
||||
postXCoordinate + width / 12, marginPixels);
|
||||
graphics2D.drawLine(postXCoordinate, marginPixels + height / 10, postXCoordinate + width / 12, marginPixels);
|
||||
|
||||
// Corde
|
||||
int ropeXCoordinate = postXCoordinate + beamLength;
|
||||
@@ -60,8 +59,7 @@ public class Dessin extends JPanel {
|
||||
int headRadiusPixels = Math.min(width, height) / 16;
|
||||
int headCenterX = ropeXCoordinate;
|
||||
int headCenterY = ropeBottomYCoordinate + headRadiusPixels;
|
||||
graphics2D.drawOval(headCenterX - headRadiusPixels, headCenterY - headRadiusPixels,
|
||||
headRadiusPixels * 2, headRadiusPixels * 2);
|
||||
graphics2D.drawOval(headCenterX - headRadiusPixels, headCenterY - headRadiusPixels, headRadiusPixels * 2, headRadiusPixels * 2);
|
||||
|
||||
// Corps
|
||||
int bodyTopYCoordinate = headCenterY + headRadiusPixels;
|
||||
@@ -71,17 +69,13 @@ public class Dessin extends JPanel {
|
||||
// Bras
|
||||
int armSpanPixels = width / 10;
|
||||
int shouldersYCoordinate = bodyTopYCoordinate + height / 24;
|
||||
graphics2D.drawLine(headCenterX, shouldersYCoordinate,
|
||||
headCenterX - armSpanPixels, shouldersYCoordinate + height / 20);
|
||||
graphics2D.drawLine(headCenterX, shouldersYCoordinate,
|
||||
headCenterX + armSpanPixels, shouldersYCoordinate + height / 20);
|
||||
graphics2D.drawLine(headCenterX, shouldersYCoordinate, headCenterX - armSpanPixels, shouldersYCoordinate + height / 20);
|
||||
graphics2D.drawLine(headCenterX, shouldersYCoordinate, headCenterX + armSpanPixels, shouldersYCoordinate + height / 20);
|
||||
|
||||
// Jambes
|
||||
int legSpanPixels = width / 12;
|
||||
graphics2D.drawLine(headCenterX, bodyBottomYCoordinate,
|
||||
headCenterX - legSpanPixels, bodyBottomYCoordinate + height / 8);
|
||||
graphics2D.drawLine(headCenterX, bodyBottomYCoordinate,
|
||||
headCenterX + legSpanPixels, bodyBottomYCoordinate + height / 8);
|
||||
graphics2D.drawLine(headCenterX, bodyBottomYCoordinate, headCenterX - legSpanPixels, bodyBottomYCoordinate + height / 8);
|
||||
graphics2D.drawLine(headCenterX, bodyBottomYCoordinate, headCenterX + legSpanPixels, bodyBottomYCoordinate + height / 8);
|
||||
|
||||
graphics2D.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user