Skip to content
Snippets Groups Projects
Commit f9005d7a authored by Chadi's avatar Chadi
Browse files

need to check in uni

parent 3175d350
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,6 @@ import javafx.scene.paint.Color; ...@@ -6,7 +6,6 @@ import javafx.scene.paint.Color;
public class Circle implements Shape { public class Circle implements Shape {
private double radius, x, y; private double radius, x, y;
public Color fillColor;
private boolean isFinished; private boolean isFinished;
public Circle(double x, double y, double radius) { public Circle(double x, double y, double radius) {
...@@ -22,7 +21,7 @@ public class Circle implements Shape { ...@@ -22,7 +21,7 @@ public class Circle implements Shape {
graphicsContext.setStroke(Color.BLACK); graphicsContext.setStroke(Color.BLACK);
graphicsContext.setLineWidth(2); graphicsContext.setLineWidth(2);
if (isFinished) { 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.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);
} }
graphicsContext.strokeOval(x - radius, y - radius, 2 * radius, 2 * radius); graphicsContext.strokeOval(x - radius, y - radius, 2 * radius, 2 * radius);
......
...@@ -8,7 +8,6 @@ public class Rectangle implements Shape{ ...@@ -8,7 +8,6 @@ public class Rectangle implements Shape{
private double x,y,width, height; private double x,y,width, height;
private boolean isFinished; private boolean isFinished;
public Color fillColor;
public Rectangle(double x, double y, double width, double height) { public Rectangle(double x, double y, double width, double height) {
this.x = x; this.x = x;
...@@ -23,7 +22,7 @@ public class Rectangle implements Shape{ ...@@ -23,7 +22,7 @@ public class Rectangle implements Shape{
graphicsContext.setStroke(Color.BLACK); graphicsContext.setStroke(Color.BLACK);
graphicsContext.setLineWidth(2); graphicsContext.setLineWidth(2);
if(isFinished){ if(isFinished){
graphicsContext.setFill(Color.RED); graphicsContext.setFill(Color.RED.deriveColor(0,1,1,0.5));
graphicsContext.fillRect(x, y, width, height); graphicsContext.fillRect(x, y, width, height);
} }
graphicsContext.strokeRect(x, y, width, height); graphicsContext.strokeRect(x, y, width, height);
...@@ -57,15 +56,9 @@ public class Rectangle implements Shape{ ...@@ -57,15 +56,9 @@ public class Rectangle implements Shape{
} }
} }
public Color getFillColor() {
return fillColor;
}
public void setFinished(boolean finished) { public void setFinished(boolean finished) {
isFinished = finished; isFinished = finished;
} }
public void setFillColor(Color fillColor) {
this.fillColor = fillColor;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment