public static void AddConnectorAsNone(this ConnectableShapeViewModel shape, PointShapeViewModel point) { point.Owner = shape; point.State |= ShapeStateFlags.Connector | ShapeStateFlags.None; point.State &= ~ShapeStateFlags.Standalone; shape.Connectors = shape.Connectors.Add(point); }
public static double DistanceTo(this PointShapeViewModel point, PointShapeViewModel other) { double dx = point.X - other.X; double dy = point.Y - other.Y; return(Sqrt(dx * dx + dy * dy)); }