Exemplo n.º 1
0
 /// <summary>Determines if this rectangle intersects with <paramref name="rect" />.</summary>
 /// <returns>This method returns true if there is any intersection.</returns>
 /// <param name="rect">The rectangle to test. </param>
 /// <filterpriority>1</filterpriority>
 public bool IntersectsWith(RectangleD rect)
 {
     return(rect.X < this.X + this.Width && this.X < rect.X + rect.Width && rect.Y < this.Y + this.Height && this.Y < rect.Y + rect.Height);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Determines if the rectangular region represented by <paramref name="rect" /> is entirely contained within this RectangleD structure.
 /// </summary>
 /// <param name="rect">The RectangleD to test.</param>
 /// <returns>This method returns true if the rectangular region represented by <paramref name="rect" /> is entirely contained within the rectangular region represented by this RectangleD otherwise false.</returns>
 public bool Contains(RectangleD rect)
 {
     return(this.X <= rect.X && rect.X + rect.Width <= this.X + this.Width && this.Y <= rect.Y && rect.Y + rect.Height <= this.Y + this.Height);
 }