-
Notifications
You must be signed in to change notification settings - Fork 0
/
Color.java
31 lines (28 loc) · 838 Bytes
/
Color.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
public class Color {
private int bgColor;
private int fgColor;
private int drawingStyle;
public static final int OUTLINE = 0;
public static final int FILL = 1;
public static final int OUTLINE_FILL = 2;
public Color(int ocolor, int fcolor, int drawstyle) {
this.bgColor = fcolor;
this.fgColor = ocolor;
this.drawingStyle = drawstyle;
}
public Color(int ocolor, int fcolor, Palette palette, int drawstyle) {
this.bgColor = palette.getColor(fcolor);
this.fgColor = palette.getColor(ocolor);
this.drawingStyle = drawstyle;
}
public Color(int ocolor) {
this(ocolor,0,Color.OUTLINE);
}
public Color(int ocolor, Palette palette)
{
this(ocolor,0,palette,Color.OUTLINE);
}
public int getBgColor() { return bgColor; }
public int getFgColor() { return fgColor; }
public int getStyle() { return drawingStyle; }
}