public static Point Center(this Rectangle rectangle) { return new Point( (int)(rectangle.X + rectangle.Width / 2f), (int)(rectangle.Y + rectangle.Height / 2f)); }