Fixes
This commit is contained in:
@@ -7,6 +7,7 @@ import ch.psi.pshell.device.Device;
|
||||
import ch.psi.pshell.device.DeviceBase;
|
||||
import ch.psi.pshell.imaging.DimensionDouble;
|
||||
import ch.psi.pshell.imaging.PointDouble;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Rectangle;
|
||||
@@ -34,7 +35,7 @@ public class BasePlate extends DeviceBase {
|
||||
new PointDouble(129.9, -150),
|
||||
new PointDouble(64.95, -187.5),
|
||||
new PointDouble(64.95, -112.5),
|
||||
new PointDouble(0, -57),
|
||||
new PointDouble(0, -75),
|
||||
new PointDouble(0, -150),
|
||||
new PointDouble(-64.95, -187.5),
|
||||
new PointDouble(-129.9, -150),
|
||||
@@ -51,7 +52,8 @@ public class BasePlate extends DeviceBase {
|
||||
new PointDouble(-64.95, 112.5)
|
||||
};
|
||||
final static int numberOfPucks = pucksPosition.length;
|
||||
final static DimensionDouble size = new DimensionDouble(500.0, 500.0);
|
||||
//final static DimensionDouble size = new DimensionDouble(580.0, 580.0);
|
||||
final static DimensionDouble size = new DimensionDouble(580.0, 580.0);
|
||||
|
||||
BasePlate() {
|
||||
super("BasePlate", new BasePlateConfig());
|
||||
@@ -128,6 +130,10 @@ public class BasePlate extends DeviceBase {
|
||||
|
||||
void draw(Graphics2D g, Rectangle plotRect, boolean drawSamples, boolean drawIds) {
|
||||
this.plotRect = plotRect;
|
||||
g.setColor(Color.BLACK);
|
||||
int size = Math.min(plotRect.width, plotRect.height);
|
||||
g.drawOval((int)(plotRect.getCenterX() - size/2),(int)(plotRect.getCenterY() - size/2), size, size);
|
||||
|
||||
for (Puck puck : getPucks()) {
|
||||
puck.draw(g, null, drawSamples, drawIds) ;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BasePlatePanel extends DevicePanel {
|
||||
return (BasePlate) super.getDevice();
|
||||
}
|
||||
|
||||
Mode mode = Mode.horizontal;
|
||||
Mode mode = Mode.single;
|
||||
|
||||
enum Mode {
|
||||
single,
|
||||
@@ -116,11 +116,11 @@ public class BasePlatePanel extends DevicePanel {
|
||||
break;
|
||||
case overlapped:
|
||||
//getDevice().draw(g2d, plotRect, false, true);
|
||||
platePlotRect = new Rectangle(plotRect.x - ((int) (plotRect.width * 0.12)), plotRect.y - ((int) (plotRect.height * 0.12)), (int) (plotRect.width * 1.24), (int) (plotRect.height * 1.24));
|
||||
platePlotRect = new Rectangle(plotRect.x - ((int) (plotRect.width * 0.14)), plotRect.y - ((int) (plotRect.height * 0.14)), (int) (plotRect.width * 1.28), (int) (plotRect.height * 1.28));
|
||||
getDevice().draw(g2d, platePlotRect, false, true);
|
||||
if (selectedPuck!=null){
|
||||
int overlappedSize = (int) (1.5 * selectedPuck.getDrawSize());
|
||||
puckPlotRect = new Rectangle((int) (plotRect.getCenterX() - overlappedSize / 2), (int) (plotRect.getCenterY() - overlappedSize / 2.5), overlappedSize, overlappedSize);
|
||||
puckPlotRect = new Rectangle((int) (plotRect.getCenterX() - overlappedSize / 2), (int) (plotRect.getCenterY() - overlappedSize / 2), overlappedSize, overlappedSize);
|
||||
selectedPuck.draw(g2d, puckPlotRect, true, false);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Puck extends DeviceBase {
|
||||
new PointDouble(-28.39445573, 44.18263554)
|
||||
};
|
||||
|
||||
final static PointDouble referencePosition = new PointDouble(0, -67.0);
|
||||
final static PointDouble referencePosition = new PointDouble(0, -66.9);
|
||||
final static Double referenceSize = 6.2;
|
||||
|
||||
final int numberOfSamples = samplesPosition.length;
|
||||
|
||||
Reference in New Issue
Block a user