ZXing.PDF417.Internal.BoundingBox.calculateMinMaxValues C# (CSharp) Method

calculateMinMaxValues() private method

Calculates the minimum and maximum X & Y values based on the corner points.
private calculateMinMaxValues ( ) : void
return void
      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);

      }