diff --git a/src/main/java/shape/Circle.java b/src/main/java/shape/Circle.java index 3c2060c6ea9a1adacfe65aa378facbe9844d6295..08123a654d4532f4dd3376d0257dc8493f9f87e2 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 b57f9dfdc85e91bbdc2e82f97d8570b17ad70507..8f7b72ec32b5776363e48bd4e378e33329465afa 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; - } }