From 19a9489aef9b3353171eca5e6b583aadb2828593 Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期日, 28 六月 2020 09:33:01 +0800 Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071 --- src/Bro.UI.Model.Winform/Element/CrossHairWithAngle.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Bro.UI.Model.Winform/Element/CrossHairWithAngle.cs b/src/Bro.UI.Model.Winform/Element/CrossHairWithAngle.cs index 60f3e5c..0ad45e8 100644 --- a/src/Bro.UI.Model.Winform/Element/CrossHairWithAngle.cs +++ b/src/Bro.UI.Model.Winform/Element/CrossHairWithAngle.cs @@ -179,18 +179,18 @@ public override void Draw(Graphics g) { - g.DrawRectangle(Pen, ImagePoint.X - HalfRectangleSize, ImagePoint.Y - HalfRectangleSize, HalfRectangleSize * 2, HalfRectangleSize * 2); + g.DrawRectangle(Pen, (float)ImagePoint.X - HalfRectangleSize, (float)ImagePoint.Y - HalfRectangleSize, HalfRectangleSize * 2, HalfRectangleSize * 2); - g.DrawLine(Pen, ImagePoint.X, ImagePoint.Y - HalfLength, ImagePoint.X, ImagePoint.Y + HalfLength); - g.DrawLine(Pen, ImagePoint.X - HalfLength, ImagePoint.Y, ImagePoint.X + HalfLength, ImagePoint.Y); + g.DrawLine(Pen, (float)ImagePoint.X, (float)ImagePoint.Y - HalfLength, (float)ImagePoint.X, (float)ImagePoint.Y + HalfLength); + g.DrawLine(Pen, (float)ImagePoint.X - HalfLength, (float)ImagePoint.Y, (float)ImagePoint.X + HalfLength, (float)ImagePoint.Y); Pen arrowPen = new Pen(Pen.Color, Pen.Width + 3.5f); arrowPen.StartCap = System.Drawing.Drawing2D.LineCap.AnchorMask; arrowPen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; - g.DrawLine(arrowPen, ImagePoint.X, ImagePoint.Y, ImagePoint.X + (float)(HalfLength * Math.Cos(Angle * Math.PI / 180.0)), ImagePoint.Y - (float)(HalfLength * Math.Sin(Angle * Math.PI / 180.0))); + g.DrawLine(arrowPen, (float)ImagePoint.X, (float)ImagePoint.Y, (float)ImagePoint.X + (float)(HalfLength * Math.Cos(Angle * Math.PI / 180.0)), (float)ImagePoint.Y - (float)(HalfLength * Math.Sin(Angle * Math.PI / 180.0))); string info = $"{Index} 鍥惧儚鍧愭爣:{ImagePoint.X},{ImagePoint.Y}\r\n鏈哄彴鍧愭爣锛歿PlatPoint.X},{PlatPoint.Y}\r\n瑙掑害锛歿Angle}"; - g.DrawString(info, new Font("NewRoman", FontSize), new SolidBrush(Pen.Color), new PointF(ImagePoint.X + FontDistance, ImagePoint.Y + FontDistance)); + g.DrawString(info, new Font("NewRoman", FontSize), new SolidBrush(Pen.Color), new PointF((float)ImagePoint.X + FontDistance, (float)ImagePoint.Y + FontDistance)); } public override bool IsMouseHover(Point p) -- Gitblit v1.8.0