This commit is contained in:
sfop
2017-08-23 14:04:39 +02:00
parent 1207513d79
commit 64de6de219
19 changed files with 5300 additions and 60 deletions

View File

@@ -148,10 +148,14 @@ public class CameraConfigDialog extends StandardDialog {
int bottom = (Integer)spinnerBottom.getValue();
double width = (Double)spinnerRefWidth.getValue();
double height = (Double)spinnerRefHeight.getValue();
double angleHor = (Double)spinnerAngleHor.getValue();
double angleVer = (Double)spinnerAngleVer.getValue();
double pixelHor = width * Math.cos(Math.toRadians(angleHor)) /Math.abs(right-left);
double pixelVer = height * Math.cos(Math.toRadians(angleVer)) /Math.abs(bottom-top);
textOriginX.setText(String.valueOf((left+right)/2));
textOriginY.setText(String.valueOf((top+bottom)/2));
textPixelSizeX.setText(String.valueOf(Convert.roundDouble(width/Math.abs(right-left),2)));
textPixelSizeY.setText(String.valueOf(Convert.roundDouble(height/Math.abs(bottom-top),2)));
textPixelSizeX.setText(String.valueOf(Convert.roundDouble(pixelHor, 2)));
textPixelSizeY.setText(String.valueOf(Convert.roundDouble(pixelVer, 2)));
ovLeft.update(new Point(Math.max(left, 0), 0));
ovTop.update(new Point(0, Math.max(top, 0)));
ovRight.update(new Point(Math.max(right, 0), 0));