Drawing over image
This commit is contained in:
@@ -255,19 +255,21 @@ public class Puck extends DeviceBase {
|
||||
|
||||
|
||||
Rectangle plotRect;
|
||||
void draw (Graphics2D g, Rectangle plotRect, boolean drawSamples, boolean drawId, BasePlate enclosingPlate){
|
||||
void draw (Graphics2D g, Rectangle plotRect, boolean drawSamples, boolean drawId, boolean drawBackground, BasePlate enclosingPlate){
|
||||
this.plotRect = plotRect;
|
||||
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);
|
||||
|
||||
if (drawSamples){
|
||||
//Draw samples
|
||||
for (Sample sample: getSamples()) {
|
||||
sample.draw(g);
|
||||
sample.draw(g, drawBackground);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user