private void calculateMinMaxValues()
{
// Constructor ensures that either Left or Right is not null
if (TopLeft == null)
{
TopLeft = new ResultPoint(0, TopRight.Y);
BottomLeft = new ResultPoint(0, BottomRight.Y);
}
else if (TopRight == null)
{
TopRight = new ResultPoint(image.Width - 1, TopLeft.Y);
BottomRight = new ResultPoint(image.Width - 1, TopLeft.Y);
}
MinX = (int) Math.Min(TopLeft.X, BottomLeft.X);
MaxX = (int) Math.Max(TopRight.X, BottomRight.X);
MinY = (int) Math.Min(TopLeft.Y, TopRight.Y);
MaxY = (int) Math.Max(BottomLeft.Y, BottomRight.Y);
}