소스 검색

Deal with the issue of the scale moving up at a resolution of 1536*1024

cxs 1 개월 전
부모
커밋
59a979cd98
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

+ 2 - 1
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -192,7 +192,8 @@ namespace OTSMeasureApp
             ImgZoomRectangle.Y = originalImgRectangle.Y;
 
             pictureBox2.Visible = false;
-            Point rulerLocation = new Point(GetZoomedImageRect(picBox).Left-10, GetZoomedImageRect(picBox).Height - (int)(control_Ruler.Height -3));
+            double h = picBox.Height - GetZoomedImageRect(picBox).Height;
+            Point rulerLocation = new Point(GetZoomedImageRect(picBox).Left-10, (int)(h / 2+GetZoomedImageRect(picBox).Height - (int)(control_Ruler.Height -3)));
             control_Ruler.Location = rulerLocation;
             //标尺初始化
             RulerInit();