public RectI(RectI source) { this._minX = source._minX; this._maxY = source._maxY; this._width = source._width; this._height = source._height; }
public void Intersects(ref RectI value, out bool result) { result = (((value.X < (this.X + this.Width)) && (this.X < (value.X + value.Width))) && (value.Y < (this.Y + this.Height))) && (this.Y < (value.Y + value.Height)); }
public void Contains(ref RectI value, out bool result) { result = (((this.X <= value.X) && ((value.X + value.Width) <= (this.X + this.Width))) && (this.Y <= value.Y)) && ((value.Y + value.Height) <= (this.Y + this.Height)); }
public override bool Equals(object other) { if (!(other is RectI)) { return(false); } RectI rect = (RectI)other; return(((this.X.Equals(rect.X) && this.Y.Equals(rect.Y)) && this.Width.Equals(rect.Width)) && this.Height.Equals(rect.Height)); }
public ContainmentType Contains(RectI rect) { var result = ContainmentType.Outside; if (((MaxX >= MinX) && (MinX <= rect.MaxX)) && ((MaxY >= rect.MaxY) && (MinY <= rect.MaxY))) { result = (((MinX <= rect.MinX) && (rect.MaxX <= MaxX)) && ((MinY <= rect.MinY) && (rect.MaxY <= MaxY))) ? ContainmentType.Inside : ContainmentType.Intersect; } return(result); }
public bool Intersects(RectI value) { if ((MaxX < value.MinX) || (MinX > value.MaxX)) { return(false); } if ((MaxY < value.MinY) || (MinY > value.MaxY)) { return(false); } return(true); //return (((this.MinX <= value.MaxX) && (this.MaxX >= value.MinX)) && ((this.MinY <= value.MaxY) && (this.MaxY >= value.MinY))); }