From 2edc3c54ba7a42d5e9bb9120b9881d418e6bd408 Mon Sep 17 00:00:00 2001 From: patrick.xu <patrick.xu@broconcentric.com> Date: 星期五, 13 八月 2021 09:38:29 +0800 Subject: [PATCH] 1. GTS回原点修改,避免来回 2. 添加单键测量结果补偿 3. 部分条件限制,日志修改 4. 来料检debug,添加退出条件判断 --- src/Bro.UI.Model.Winform/Element/CrossHair.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Bro.UI.Model.Winform/Element/CrossHair.cs b/src/Bro.UI.Model.Winform/Element/CrossHair.cs index 4142c28..c38a119 100644 --- a/src/Bro.UI.Model.Winform/Element/CrossHair.cs +++ b/src/Bro.UI.Model.Winform/Element/CrossHair.cs @@ -117,15 +117,15 @@ public override void Draw(Graphics g) { - g.DrawRectangle(Pen, CenterPoint.U - HalfRectangleSize, CenterPoint.V - HalfRectangleSize, HalfRectangleSize * 2, HalfRectangleSize * 2); + g.DrawRectangle(Pen, (float)CenterPoint.U - HalfRectangleSize, (float)CenterPoint.V - HalfRectangleSize, HalfRectangleSize * 2, HalfRectangleSize * 2); - g.DrawLine(Pen, CenterPoint.U, CenterPoint.V - HalfLength, CenterPoint.U, CenterPoint.V + HalfLength); - g.DrawLine(Pen, CenterPoint.U - HalfLength, CenterPoint.V, CenterPoint.U + HalfLength, CenterPoint.V); + g.DrawLine(Pen, (float)CenterPoint.U, (float)CenterPoint.V - HalfLength, (float)CenterPoint.U, (float)CenterPoint.V + HalfLength); + g.DrawLine(Pen, (float)CenterPoint.U - HalfLength, (float)CenterPoint.V, (float)CenterPoint.U + HalfLength, (float)CenterPoint.V); if (IsShowRemark) { string info = Index.ToString() + ":(" + CenterPoint.X.ToString() + ";" + CenterPoint.Y.ToString() + ")"; - g.DrawString(info, new Font("NewRoman", FontSize), new SolidBrush(Pen.Color), new PointF(CenterPoint.U + FontDistance, CenterPoint.V + FontDistance)); + g.DrawString(info, Font, new SolidBrush(Pen.Color), new PointF((float)CenterPoint.U + FontDistance, (float)CenterPoint.V + FontDistance)); } } @@ -148,7 +148,7 @@ return rect.IntersectsWith(BaseRectangle); } - public override void CalculateBaseRectangle() + public void CalculateBaseRectangle() { BaseRectangle = new Rectangle(new Point((int)CenterPoint.U - HalfLength, (int)CenterPoint.V - HalfLength), new Size(HalfLength * 2, HalfLength * 2)); } -- Gitblit v1.8.0