Drawing over image

This commit is contained in:
2018-04-09 16:14:22 +02:00
parent ee310ea7bd
commit fd15d2cf48
6 changed files with 191 additions and 70 deletions

View File

@@ -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);