Drawing over image
This commit is contained in:
@@ -164,12 +164,14 @@ public class Sample extends DeviceBase {
|
||||
return Color.GRAY;
|
||||
}
|
||||
|
||||
void draw (Graphics2D g){
|
||||
void draw (Graphics2D g, boolean drawBackground){
|
||||
Point position = getDrawPosition();
|
||||
int size = getDrawSize();
|
||||
|
||||
g.setColor(getColor());
|
||||
g.fillOval(position.x - size / 2, position.y - size / 2, size, size);
|
||||
if (drawBackground){
|
||||
g.setColor(getColor());
|
||||
g.fillOval(position.x - size / 2, position.y - size / 2, size, size);
|
||||
}
|
||||
g.setColor(getBorderColor());
|
||||
g.drawOval(position.x - size / 2, position.y - size / 2, size, size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user