From f9005d7a306d7999d3b28bfd6e4e8eab0b503b1a Mon Sep 17 00:00:00 2001
From: Chadi <130995657+PayneKev@users.noreply.github.com>
Date: Wed, 9 Oct 2024 15:48:34 +0200
Subject: [PATCH] need to check in uni

---
 src/main/java/shape/Circle.java    | 3 +--
 src/main/java/shape/Rectangle.java | 9 +--------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/main/java/shape/Circle.java b/src/main/java/shape/Circle.java
index 3c2060c..08123a6 100644
--- a/src/main/java/shape/Circle.java
+++ b/src/main/java/shape/Circle.java
@@ -6,7 +6,6 @@ import javafx.scene.paint.Color;
 public class Circle implements Shape {
 
     private double radius, x, y;
-    public Color fillColor;
     private boolean isFinished;
 
     public Circle(double x, double y, double radius) {
@@ -22,7 +21,7 @@ public class Circle implements Shape {
         graphicsContext.setStroke(Color.BLACK);
         graphicsContext.setLineWidth(2);
         if (isFinished) {
-            graphicsContext.setFill(Color.GREEN);
+            graphicsContext.setFill(Color.GREEN.deriveColor(0,1,1,0.5));
             graphicsContext.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);
         }
         graphicsContext.strokeOval(x - radius, y - radius, 2 * radius, 2 * radius);
diff --git a/src/main/java/shape/Rectangle.java b/src/main/java/shape/Rectangle.java
index b57f9df..8f7b72e 100644
--- a/src/main/java/shape/Rectangle.java
+++ b/src/main/java/shape/Rectangle.java
@@ -8,7 +8,6 @@ public class Rectangle implements Shape{
 
     private double x,y,width, height;
     private boolean isFinished;
-    public Color fillColor;
 
     public Rectangle(double x, double y, double width, double height) {
         this.x = x;
@@ -23,7 +22,7 @@ public class Rectangle implements Shape{
         graphicsContext.setStroke(Color.BLACK);
         graphicsContext.setLineWidth(2);
         if(isFinished){
-            graphicsContext.setFill(Color.RED);
+            graphicsContext.setFill(Color.RED.deriveColor(0,1,1,0.5));
             graphicsContext.fillRect(x, y, width, height);
         }
         graphicsContext.strokeRect(x, y, width, height);
@@ -57,15 +56,9 @@ public class Rectangle implements Shape{
         }
     }
 
-    public Color getFillColor() {
-        return fillColor;
-    }
 
     public void setFinished(boolean finished) {
         isFinished = finished;
     }
 
-    public void setFillColor(Color fillColor) {
-        this.fillColor = fillColor;
-    }
 }
-- 
GitLab