private static void DrawArrow(DrawingContext context, Point point1, Point point2, SolidColorBrush color) { var pen = new Pen(color, 1 * _scale); var startPoint = ConvertPoint(point1); var endPoint = ConvertPoint(point2); context.DrawLine(pen, startPoint, endPoint); }
private static SPoint ConvertPoint(Point point) { return(new SPoint( scaleCoordinate(point.X), scaleCoordinate(point.Y) )); double scaleCoordinate(int coordinate) { return((coordinate + 0.5) * (_nodeWidth + _bordersWidth) + _bordersWidth); } }
public void UpdateFieldNodeType(Point point, NodeType newType) { Nodes.GetNode(point).NodeType = newType; FieldNodesChangedEvent?.Invoke(this); }