+
+
+ Struct RectangleF
+
+
+Stores the location and size of a rectangular region.
+
+
+
+
+
Inherited Members
+
+ System.Object.Equals(System.Object, System.Object)
+
+
+ System.Object.GetType()
+
+
+ System.Object.ReferenceEquals(System.Object, System.Object)
+
+
+
+ Assembly: Terminal.Gui.dll
+ Syntax
+
+
public struct RectangleF : IEquatable<RectangleF>
+
+ Constructors
+
+
+
+
+ RectangleF(Single, Single, Single, Single)
+
+Initializes a new instance of the
RectangleF class with the specified location
+and size.
+
+
+ Declaration
+
+
public RectangleF(float x, float y, float width, float height)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | System.Single |
+ x |
+ |
+
+
+ | System.Single |
+ y |
+ |
+
+
+ | System.Single |
+ width |
+ |
+
+
+ | System.Single |
+ height |
+ |
+
+
+
+
+
+
+ RectangleF(PointF, SizeF)
+
+Initializes a new instance of the
RectangleF class with the specified location
+and size.
+
+
+ Declaration
+
+
public RectangleF(PointF location, SizeF size)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | PointF |
+ location |
+ |
+
+
+ | SizeF |
+ size |
+ |
+
+
+
+ Fields
+
+
+
+ Empty
+
+Initializes a new instance of the
RectangleF class.
+
+
+ Declaration
+
+
public static readonly RectangleF Empty
+
+ Field Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | RectangleF |
+ |
+
+
+
+ Properties
+
+
+
+
+ Bottom
+
+Gets the y-coordinate of the lower-right corner of the rectangular region defined by this
+
RectangleF.
+
+
+ Declaration
+
+
[Browsable(false)]
+public float Bottom { get; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ Height
+
+Gets or sets the height of the rectangular region defined by this
RectangleF.
+
+
+ Declaration
+
+
public float Height { get; set; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ IsEmpty
+
+
+ Declaration
+
+
[Browsable(false)]
+public bool IsEmpty { get; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ Left
+
+Gets the x-coordinate of the upper-left corner of the rectangular region defined by this
+
RectangleF .
+
+
+ Declaration
+
+
[Browsable(false)]
+public float Left { get; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ Location
+
+Gets or sets the coordinates of the upper-left corner of the rectangular region represented by this
+
RectangleF.
+
+
+ Declaration
+
+
[Browsable(false)]
+public PointF Location { get; set; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | PointF |
+ |
+
+
+
+
+
+
+ Right
+
+Gets the x-coordinate of the lower-right corner of the rectangular region defined by this
+
RectangleF.
+
+
+ Declaration
+
+
[Browsable(false)]
+public float Right { get; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ Size
+
+
+ Declaration
+
+
[Browsable(false)]
+public SizeF Size { get; set; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | SizeF |
+ |
+
+
+
+
+
+
+ Top
+
+Gets the y-coordinate of the upper-left corner of the rectangular region defined by this
+
RectangleF.
+
+
+ Declaration
+
+
[Browsable(false)]
+public float Top { get; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ Width
+
+Gets or sets the width of the rectangular region defined by this
RectangleF.
+
+
+ Declaration
+
+
public float Width { get; set; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ X
+
+Gets or sets the x-coordinate of the upper-left corner of the rectangular region defined by this
+
RectangleF.
+
+
+ Declaration
+
+
public float X { get; set; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+
+
+
+ Y
+
+Gets or sets the y-coordinate of the upper-left corner of the rectangular region defined by this
+
RectangleF.
+
+
+ Declaration
+
+
public float Y { get; set; }
+
+ Property Value
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Single |
+ |
+
+
+
+ Methods
+
+
+
+
+ Contains(Single, Single)
+
+Determines if the specified point is contained within the rectangular region defined by this
+
Rect .
+
+
+ Declaration
+
+
public bool Contains(float x, float y)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | System.Single |
+ x |
+ |
+
+
+ | System.Single |
+ y |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ Contains(PointF)
+
+Determines if the specified point is contained within the rectangular region defined by this
+
Rect .
+
+
+ Declaration
+
+
public bool Contains(PointF pt)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | PointF |
+ pt |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ Contains(RectangleF)
+
+Determines if the rectangular region represented by
rect is entirely contained within
+the rectangular region represented by this
Rect .
+
+
+ Declaration
+
+
public bool Contains(RectangleF rect)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | RectangleF |
+ rect |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ Equals(Object)
+
+
+ Declaration
+
+
public override bool Equals(object obj)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | System.Object |
+ obj |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+ Overrides
+ System.ValueType.Equals(System.Object)
+
+
+
+ Equals(RectangleF)
+
+Returns true if two
RectangleF objects have equal location and size.
+
+
+ Declaration
+
+
public bool Equals(RectangleF other)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | RectangleF |
+ other |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ FromLTRB(Single, Single, Single, Single)
+
+Creates a new
RectangleF with the specified location and size.
+
+
+ Declaration
+
+
public static RectangleF FromLTRB(float left, float top, float right, float bottom)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | System.Single |
+ left |
+ |
+
+
+ | System.Single |
+ top |
+ |
+
+
+ | System.Single |
+ right |
+ |
+
+
+ | System.Single |
+ bottom |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | RectangleF |
+ |
+
+
+
+
+
+
+ GetHashCode()
+
+
+ Declaration
+
+
public override int GetHashCode()
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Int32 |
+ |
+
+
+
+ Overrides
+ System.ValueType.GetHashCode()
+
+
+
+ Inflate(Single, Single)
+
+Inflates this
Rect by the specified amount.
+
+
+ Declaration
+
+
public void Inflate(float x, float y)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | System.Single |
+ x |
+ |
+
+
+ | System.Single |
+ y |
+ |
+
+
+
+
+
+
+ Inflate(RectangleF, Single, Single)
+
+Creates a
Rect that is inflated by the specified amount.
+
+
+ Declaration
+
+
public static RectangleF Inflate(RectangleF rect, float x, float y)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | RectangleF |
+ rect |
+ |
+
+
+ | System.Single |
+ x |
+ |
+
+
+ | System.Single |
+ y |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | RectangleF |
+ |
+
+
+
+
+
+
+ Inflate(SizeF)
+
+Inflates this
Rect by the specified amount.
+
+
+ Declaration
+
+
public void Inflate(SizeF size)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | SizeF |
+ size |
+ |
+
+
+
+
+
+
+ Intersect(RectangleF)
+
+Creates a Rectangle that represents the intersection between this Rectangle and rect.
+
+
+ Declaration
+
+
public void Intersect(RectangleF rect)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | RectangleF |
+ rect |
+ |
+
+
+
+
+
+
+ Intersect(RectangleF, RectangleF)
+
+Creates a rectangle that represents the intersection between a and b. If there is no intersection, an
+empty rectangle is returned.
+
+
+ Declaration
+
+
public static RectangleF Intersect(RectangleF a, RectangleF b)
+
+ Parameters
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | RectangleF |
+ |
+
+
+
+
+
+
+ IntersectsWith(RectangleF)
+
+Determines if this rectangle intersects with rect.
+
+
+ Declaration
+
+
public bool IntersectsWith(RectangleF rect)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | RectangleF |
+ rect |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ Offset(Single, Single)
+
+Adjusts the location of this rectangle by the specified amount.
+
+
+ Declaration
+
+
public void Offset(float x, float y)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | System.Single |
+ x |
+ |
+
+
+ | System.Single |
+ y |
+ |
+
+
+
+
+
+
+ Offset(PointF)
+
+Adjusts the location of this rectangle by the specified amount.
+
+
+ Declaration
+
+
public void Offset(PointF pos)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | PointF |
+ pos |
+ |
+
+
+
+
+
+
+ ToString()
+
+
+ Declaration
+
+
public override string ToString()
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.String |
+ |
+
+
+
+ Overrides
+ System.ValueType.ToString()
+
+
+
+ Union(RectangleF, RectangleF)
+
+Creates a rectangle that represents the union between a and b.
+
+
+ Declaration
+
+
public static RectangleF Union(RectangleF a, RectangleF b)
+
+ Parameters
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | RectangleF |
+ |
+
+
+
+ Operators
+
+
+
+
+ Equality(RectangleF, RectangleF)
+
+Tests whether two
RectangleF objects have equal location and size.
+
+
+ Declaration
+
+
public static bool operator ==(RectangleF left, RectangleF right)
+
+ Parameters
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+
+
+
+ Implicit(Rect to RectangleF)
+
+
+ Declaration
+
+
public static implicit operator RectangleF(Rect r)
+
+ Parameters
+
+
+
+ | Type |
+ Name |
+ Description |
+
+
+
+
+ | Rect |
+ r |
+ |
+
+
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | RectangleF |
+ |
+
+
+
+
+
+
+ Inequality(RectangleF, RectangleF)
+
+Tests whether two
RectangleF objects differ in location or size.
+
+
+ Declaration
+
+
public static bool operator !=(RectangleF left, RectangleF right)
+
+ Parameters
+
+ Returns
+
+
+
+ | Type |
+ Description |
+
+
+
+
+ | System.Boolean |
+ |
+
+
+
+ Implements
+
+ System.IEquatable<T>
+
+