Refine the weight max and its drawing.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 18 Jan 2019 12:24:17 +0000 (13:24 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 18 Jan 2019 12:24:17 +0000 (13:24 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/PersonLeftPanel.java
src/PersonRightPanel.java
src/Weight.java

index e8cb6f71d5a8dc5a8896c9f10887beb57dccacb4..4c4d9a40203dafb50e32aa9e3eb300baacbb4fa6 100644 (file)
@@ -49,6 +49,6 @@ public class PersonLeftPanel extends JPanel {
     public void drawWeight(int weight) {
         Graphics g = this.getGraphics();
         g.setColor(Color.black);
-        g.fillOval(44, 76, 30, (weight * 20) / 600);
+        g.fillOval(44, 80, 30, (weight * 30) / 250);
     }
 }
index f56b32db4dd1cbeff9cf50dbd365cdcad9b7ce11..8814863980a6598a5acbc4eea0d78ef3f208a8ec 100644 (file)
@@ -50,6 +50,6 @@ public class PersonRightPanel extends JPanel {
         g2d.fillOval(62, 50, 6, 3);
         // Weigth
         g2d.setColor(Color.black);
-        g2d.fillOval(44, 76, 30, (personObj.getWeight().getWeight() * 20) / 600);
+        g2d.fillOval(44, 80, 30, (personObj.getWeight().getWeight() * 30) / 250);
     }
 }
index 82fa712ce3f75a78b36ce2b2d185eae46b844745..c979f3ddcab3911914e519b71075d4023fe0507a 100644 (file)
@@ -1,6 +1,6 @@
 public class Weight {
     private int min = 2;
-    private int max = 600;
+    private int max = 250;
     private int defaultWeight = 72;
     private int weight;