29 lines
772 B
C#
29 lines
772 B
C#
using System.Windows.Controls;
|
|
using System.Windows.Media;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace PamhagenSysCtrl.Helpers.Pipeline {
|
|
public class PipeJoin : INode {
|
|
|
|
public double CenterX { get; set; }
|
|
public double CenterY { get; set; }
|
|
public string Label { get; } = "";
|
|
|
|
public PipeJoin(double x, double y) {
|
|
CenterX = x;
|
|
CenterY = y;
|
|
}
|
|
|
|
public void Draw(Canvas canvas) {
|
|
var e = new Rectangle() {
|
|
Height = 18,
|
|
Width = 18,
|
|
Fill = Brushes.Black,
|
|
};
|
|
e.SetValue(Canvas.LeftProperty, CenterX - 9);
|
|
e.SetValue(Canvas.TopProperty, CenterY - 9);
|
|
canvas.Children.Add(e);
|
|
}
|
|
}
|
|
}
|