diff --git a/src/sig/Color.java b/src/sig/Color.java index c6e0056..79297c6 100644 --- a/src/sig/Color.java +++ b/src/sig/Color.java @@ -1,7 +1,7 @@ package sig; public class Color { - int r,g,b; + int r,g,b,a; final static public Color BLACK = new Color(0,0,0); final static public Color RED = new Color(204,0,0); @@ -21,13 +21,18 @@ public class Color { final static public Color BRIGHT_WHITE = new Color(255,255,255); public Color(int r, int g, int b) { + this(r,g,b,255); + } + + public Color(int r, int g, int b,int a) { super(); this.r = r; this.g = g; this.b = b; + this.a = a; } public int getColor() { - return (r<<16)+(g<<8)+b; + return (a<<24)+(r<<16)+(g<<8)+b; } } diff --git a/src/sig/Panel.java b/src/sig/Panel.java index 3abffb4..9d9101f 100644 --- a/src/sig/Panel.java +++ b/src/sig/Panel.java @@ -116,7 +116,8 @@ public class Panel extends JPanel implements Runnable { new Point(30,218), }); //FillRect(p,Color.BRIGHT_RED,200,200,600,64); - FillCircle(p,Color.BRIGHT_BLUE,150,150,100); + final Color testAlpha = new Color(150,0,0,128); + FillCircle(p,testAlpha,150,150,100); FillOval(p,Color.BRIGHT_GREEN,300,150,100,50); } @@ -198,7 +199,7 @@ public class Panel extends JPanel implements Runnable { for (int x=(int)Math.round(e1.x_of_min_y);x<=e2.x_of_min_y;x++) { int index = (scanLine+(int)y_offset)*width+x+(int)x_offset; if (index