From f52302d69d60ce15b0d5b100e30082c5a6e9caa1 Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期五, 03 七月 2020 18:38:44 +0800 Subject: [PATCH] merge --- 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