Ejemplo n.º 1
0
        public static void SetCircle(this Ellipse ellipse, Vector2 center, Vector2 another)
        {
            var radius = Vector2.Subtract(center, another).Length;
            var x      = center.X - radius;
            var y      = center.Y - radius;

            ellipse.Width  = ellipse.Height = radius * 2;
            ellipse.Margin = new Thickness(x, y, 0, 0);
        }