Esempio n. 1
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            TcRectangle rhs = obj as TcRectangle;

            return(UpperLeftX == rhs.UpperLeftX && UpperLeftY == rhs.UpperLeftY && LowerRightX == rhs.LowerRightX && LowerRightY == rhs.LowerRightY);
        }
Esempio n. 2
0
 /// <summary>
 /// Function to calculate the overlapping area between two rectangles represented by points.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmULX">Upper left X (East) of the second rectangle</param>
 /// <param name="prmULY">Upper left Y (North) of the second rectangle</param>
 /// <param name="prmLRX">Lower right X (East) of the second rectangle</param>
 /// <param name="prmLRY">Lower right Y (North) of the second rectangle</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public TcRectangle OverlapArea(Double prmULX, Double prmULY, Double prmLRX, Double prmLRY)
 {
     return(TcRectangle.OverlapArea(this, prmULX, prmULY, prmLRX, prmLRY));
 }
Esempio n. 3
0
 public TcRectangle(TcRectangle prmRectangle)
     : this(prmRectangle.UpperLeftX, prmRectangle.UpperLeftY, prmRectangle.LowerRightX, prmRectangle.LowerRightY)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Function to calculate the overlapping area between two rectangles represented by points.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmRect1">Rectangle 1</param>
 /// <param name="prmULX">Upper left X (East) of the second rectangle</param>
 /// <param name="prmULY">Upper left Y (North) of the second rectangle</param>
 /// <param name="prmLRX">Lower right X (East) of the second rectangle</param>
 /// <param name="prmLRY">Lower right Y (North) of the second rectangle</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public static TcRectangle OverlapArea(TcRectangle prmRect, Double prmULX, Double prmULY, Double prmLRX, Double prmLRY)
 {
     return(TcRectangle.OverlapArea(prmRect.UpperLeftX, prmRect.UpperLeftY, prmRect.LowerRightX, prmRect.LowerRightY, prmULX, prmULY, prmLRX, prmLRY));
 }
Esempio n. 5
0
 /// <summary>
 /// Function to calculate the overlapping area between two rectangles represented by points.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmRect">Rectangle 2</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public TcRectangle OverlapArea(TcRectangle prmRect)
 {
     return(TcRectangle.OverlapArea(this, prmRect));
 }
Esempio n. 6
0
 /// <summary>
 /// Function to calculate the overlapping area between two rectangles represented by points.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmRect1">Rectangle 1</param>
 /// <param name="prmRect2">Rectangle 2</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public static TcRectangle OverlapArea(TcRectangle prmRect1, TcRectangle prmRect2)
 {
     return(TcRectangle.OverlapArea(prmRect1.UpperLeftX, prmRect1.UpperLeftY, prmRect1.LowerRightX, prmRect1.LowerRightY,
                                    prmRect2.UpperLeftX, prmRect2.UpperLeftY, prmRect2.LowerRightX, prmRect2.LowerRightY));
 }
Esempio n. 7
0
 /// <summary>
 /// Function to determine whether there is an overlap between this and another rectangles.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmULX">Upper left X (East) of the second rectangle</param>
 /// <param name="prmULY">Upper left Y (North) of the second rectangle</param>
 /// <param name="prmLRX">Lower right X (East) of the second rectangle</param>
 /// <param name="prmLRY">Lower right Y (North) of the second rectangle</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public Boolean HasOverlap(Double prmULX, Double prmULY, Double prmLRX, Double prmLRY)
 {
     return(TcRectangle.HasOverlap(this, prmULX, prmULY, prmLRX, prmLRY));
 }
Esempio n. 8
0
 /// <summary>
 /// Function to determine whether there is an overlap between this and another rectangles.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmRect">Rectangle 2</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public Boolean HasOverlap(TcRectangle prmRect)
 {
     return(TcRectangle.HasOverlap(this, prmRect));
 }
Esempio n. 9
0
 /// <summary>
 /// Function to determine whether there is an overlap between two rectangles.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmRect1">Rectangle 1</param>
 /// <param name="prmULX">Upper left X (East) of the second rectangle</param>
 /// <param name="prmULY">Upper left Y (North) of the second rectangle</param>
 /// <param name="prmLRX">Lower right X (East) of the second rectangle</param>
 /// <param name="prmLRY">Lower right Y (North) of the second rectangle</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public static Boolean HasOverlap(TcRectangle prmRect, Double prmULX, Double prmULY, Double prmLRX, Double prmLRY)
 {
     return(TcRectangle.HasOverlap(prmRect.UpperLeftX, prmRect.UpperLeftY, prmRect.LowerRightX, prmRect.LowerRightY, prmULX, prmULY, prmLRX, prmLRY));
 }
Esempio n. 10
0
 /// <summary>
 /// Function to determine whether there is an overlap between two rectangles.
 /// It takes of the graphical rectangle where the Y (North) coordinates are inverted.
 /// </summary>
 /// <param name="prmRect1">Rectangle 1</param>
 /// <param name="prmRect2">Rectangle 2</param>
 /// <returns>True if the rectangles intersect, False otherwise</returns>
 public static Boolean HasOverlap(TcRectangle prmRect1, TcRectangle prmRect2)
 {
     return(TcRectangle.HasOverlap(prmRect1.UpperLeftX, prmRect1.UpperLeftY, prmRect1.LowerRightX, prmRect1.LowerRightY,
                                   prmRect2.UpperLeftX, prmRect2.UpperLeftY, prmRect2.LowerRightX, prmRect2.LowerRightY));
 }