From 09738deea66327d1fe13237a7f4bc0bcc253d80e Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期五, 24 五月 2024 09:31:01 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/Yw/Hydro.V1.1

---
 Hydraulic/Hydro.MapUI/Map/MapViewer.Draw.cs |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/Hydraulic/Hydro.MapUI/Map/MapViewer.Draw.cs b/Hydraulic/Hydro.MapUI/Map/MapViewer.Draw.cs
index 144721b..241b691 100644
--- a/Hydraulic/Hydro.MapUI/Map/MapViewer.Draw.cs
+++ b/Hydraulic/Hydro.MapUI/Map/MapViewer.Draw.cs
@@ -69,11 +69,28 @@
 
                 // 鎭㈠涔嬪墠淇濆瓨鐨勭粯鍥剧姸鎬�
 
+                //var Cps = new List<PointF>
+                //{
+                //    template.BackGroundPoint1,
+                //    new PointF(template.BackGroundPoint2.X,template.BackGroundPoint1.Y),
+                //    new PointF(template.BackGroundPoint1.X,template.BackGroundPoint2.Y),
+                //    //template.BackGroundPoint2,
+
+
+                //};
+                var p1 = new PointF(template.BackGroundImgX, template.BackGroundImgY);
+                var p2 = new PointF(template.BackGroundImgX + template.BackGroundImgWidth, template.BackGroundImgY + template.BackGroundImgHeight);
+
+                var f = template.BackGroundImgRotaAngle / 180 * Math.PI;
+                var djx = Math.Sqrt((Math.Pow(template.BackGroundImgWidth, 2) + Math.Pow(template.BackGroundImgHeight, 2)));
+                var p3 = new PointF(p1.X + (float)(Math.Cos(f) * template.BackGroundImgWidth), p1.Y + (float)(Math.Sin(f) * template.BackGroundImgWidth));
+                var p4 = new PointF(p1.X - (float)(Math.Sin(f) * template.BackGroundImgHeight), p1.Y + (float)(Math.Cos(f) * template.BackGroundImgHeight));
                 var Cps = new List<PointF>
                 {
-                    template.BackGroundPoint1,
-                    new PointF(template.BackGroundPoint2.X,template.BackGroundPoint1.Y),
-                    new PointF(template.BackGroundPoint1.X,template.BackGroundPoint2.Y),
+                    //template.BackGroundPoint1,
+                    //new PointF(template.BackGroundImgX,template.BackGroundImgY),
+                    p1,
+                    p3,p4
                     //template.BackGroundPoint2,
                     
                  

--
Gitblit v1.9.3