-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShape.java
More file actions
45 lines (34 loc) · 1.12 KB
/
Shape.java
File metadata and controls
45 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import javafx.scene.paint.Color;
import javafx.scene.canvas.GraphicsContext;
/**
* Write a description of class Shape here.
*
* @author (your name)
* @version (a version number or a date)
*/
public abstract class Shape{
public Color fillColor;
public Color outlineColor;
public double outlineWidth;
public boolean rightselected = false;
public double posx;
public double posy;
public void rightSelectionToggleOn(){
rightselected = true;
}
public void rightSelectionToggleOff(){
rightselected = false;
}
public double getX() {return posx;}
public void setX(double iposx) {this.posx = iposx;}
public double getY() { return posy;}
public void setY(double iposy) { this.posy = iposy; }
public Color getOutlineColor() { return outlineColor; }
public void setOutlineColor(Color outlineColor) { this.outlineColor = outlineColor;}
public Color getFillColor() { return fillColor; }
public void setFillColor(Color fillColor) {
this.fillColor = fillColor;
}
public abstract boolean contains(double x, double y);
public abstract void draw(GraphicsContext gc);
}