Example #1
0
 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);
 }
Example #2
0
        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));
        }