コード例 #1
0
ファイル: Rectangle.cs プロジェクト: jesconsa/Telerik-Academy
 public bool Contains(Rectangle rectangle)
 {
     return IsInRectangle(rectangle.TopLeftPoint) &&
            IsInRectangle(new Point(rectangle.TopLeftPoint.X + Width, rectangle.TopLeftPoint.Y + Height));
 }
コード例 #2
0
ファイル: Rectangle.cs プロジェクト: jesconsa/Telerik-Academy
 public bool Intersects(Rectangle rectangle)
 {
     return IsInRectangle(rectangle.TopLeftPoint) ||
            rectangle.IsInRectangle(this.TopLeftPoint);
 }