| | |
| | | //var gs = bufferG.Save(); |
| | | // 应用矩阵变换以抵消之前的翻转效果 |
| | | //bufferG.ScaleTransform(1 / Zoom.X, 1 / Zoom.Y); |
| | | List<PointF> p = new List<PointF>(); |
| | | |
| | | if (!this.mapOption.isAutoBackgroundImage) |
| | | { |
| | | 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, |
| | | |
| | | |
| | | }; |
| | | Cps.ForEach(cp => p.Add(WorldPointToMapPoint(cp, template.BackGroundElev, template.OffSet))); |
| | | } |
| | | else |
| | | { |
| | | |
| | | // 恢复之前保存的绘图状态 |
| | | // 恢复之前保存的绘图状态 |
| | | |
| | | //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 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 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> |
| | | 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)); |
| | | p3.Y = p4.Y; |
| | | //p4.Y = -p4.Y; |
| | | var Cps = new List<PointF> |
| | | { |
| | | //template.BackGroundPoint1, |
| | | //new PointF(template.BackGroundImgX,template.BackGroundImgY), |
| | | p1, |
| | | p3,p4 |
| | | p4, |
| | | p3,p1 |
| | | //template.BackGroundPoint2, |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | List<PointF> p = new List<PointF>(); |
| | | Cps.ForEach(cp => p.Add(WorldPointToMapPoint(cp, template.BackGroundElev, template.OffSet))); |
| | | //List<PointF> p = new List<PointF>(); |
| | | Cps.ForEach(cp => p.Add(WorldPointToMapPoint(cp, template.BackGroundElev, template.OffSet))); |
| | | } |
| | | |
| | | //bufferG.DrawImage(System.Drawing.Image.FromFile(@"C:\Users\cloud\Pictures\GenshinImpactCloudGame\QQ截图20230919105637.png"), p[0]); |
| | | try |