API Reference
Rect
A rectangle in buffer coordinates.
Inheritance
- ValueType
- Rect
Usage
Explore 6 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Method Rect.Inset
- Method Rect.Intersect
- Property Region.Bounds
Accepted by parameters 3
- Method Rect.Equals
- Method Rect.Intersect
- Constructor Region.Region
Constructors
public Rect(Int32 x, Int32 y, Int32 width, Int32 height) #Creates a rectangle; negative sizes become 0.
Parameters
- x System.Int32
- Left column.
- y System.Int32
- Top row.
- width System.Int32
- Width.
- height System.Int32
- Height.
Methods
public Boolean Equals(Rect other) #BooleanIndicates whether the current object is equal to another object of the same type.
Parameters
- other ConsoleMonster.Canvas.Rect
- An object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.
public override Boolean Equals(Object? obj) #BooleanIndicates whether this instance and a specified object are equal.
Parameters
- obj System.Object?
- The object to compare with the current instance.
Returns
true if obj and this instance are the same type and represent the same value; otherwise, false.
public override Int32 GetHashCode() #Int32Returns the hash code for this instance.
Returns
A 32-bit signed integer that is the hash code for this instance.
public Rect Inset(Int32 left, Int32 top, Int32 right, Int32 bottom) #RectReturns the rectangle shrunk on each side.
Parameters
- left System.Int32
- Left inset.
- top System.Int32
- Top inset.
- right System.Int32
- Right inset.
- bottom System.Int32
- Bottom inset.
Returns
The inner rectangle.
public Rect Intersect(Rect other) #RectReturns the intersection with another rectangle.
Parameters
- other ConsoleMonster.Canvas.Rect
- The other rectangle.
Returns
The overlap (possibly empty).
public override String ToString() #StringReturns the fully qualified type name of this instance.
Returns
The fully qualified type name.