Yw.WinFrmUI.Hydro.L3d.Core/02-helper/05-network/Network2dExtensions.cs
@@ -1,4 +1,6 @@ namespace Yw.WinFrmUI.Hydro using OpenTK.Graphics.ES20; namespace Yw.WinFrmUI.Hydro { /// <summary> /// @@ -8,7 +10,7 @@ /// <summary> /// 绘制2d /// </summary> public static void Draw2d(this NetworkL3d nw) public static void Draw2d(this NetworkL3d nw, float zoom) { if (nw == null) { @@ -16,12 +18,28 @@ } nw.Links.ForEach(x => { x.Draw2d(); if (x is PumpL3d pump) { pump.Draw2d(zoom); } else { x.Draw2d(); } }); nw.Nodes.ForEach(x => { x.Draw2d(); if (x is SourceL3d source) { source.Draw2d(zoom); } else { x.Draw2d(); } }); }