-
Notifications
You must be signed in to change notification settings - Fork 0
/
BetterShape.java
62 lines (51 loc) · 1 KB
/
BetterShape.java
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import java.awt.Color;
import java.awt.Shape;
public class BetterShape {
/**
*
*/
private int stroke;
private float alpha;
private Color color;
private Boolean fill;
private Boolean brush;
private Shape s;
BetterShape(Shape s, Color color, Boolean fill, int stroke, float alpha) {
this.s = s;
this.color = color;
this.fill = fill;
this.stroke = stroke;
this.alpha = alpha;
this.brush = false;
}
BetterShape(Shape s, Color color, Boolean fill, int stroke, float alpha, Boolean pencil) {
this.s = s;
this.color = color;
this.fill = fill;
this.stroke = stroke;
this.alpha = alpha;
this.brush = pencil;
}
public int getStroke() {
return stroke;
}
public float getAlpha() {
return alpha;
}
public Color getColor() {
return color;
}
public Boolean getFill() {
return fill;
}
public Boolean getBrush() {
return brush;
}
public Shape getShape() {
return s;
}
@Override
public String toString() {
return String.format(stroke + " " + alpha + " " + color);
}
}