public partial class Form1 : Form
{
Point downPoint , upPoint;
List shapes = new List();
public ShapesEnum shapeType;
public
Try something like this in order to have the start and end points the right way:
int x0 = Math.Min(upPoint.X, downPoint.X);
int y0 = Math.Min(upPoint.Y, downPoint.Y);
Point upperLeft = new Point(x0, y0);
int x1 = Math.Max(upPoint.X, downPoint.X);
int y1 = Math.Max(upPoint.Y, downPoint.Y);
Point lowerRight = new Point(x1, y1);
And
Rectangle rect = new Rectangle(x0, y0, x1 - x0, y1 - y0);