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
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
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
Fields
|
Improve this Doc
View Source
Empty
Initializes a new instance of the
RectangleF class.
Declaration
public static readonly RectangleF Empty
Field Value
Properties
|
Improve this Doc
View Source
Bottom
Gets the y-coordinate of the lower-right corner of the rectangular region defined by this
RectangleF.
Declaration
[Browsable(false)]
public readonly float Bottom { get; }
Property Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
IsEmpty
Declaration
[Browsable(false)]
public readonly bool IsEmpty { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Left
Gets the x-coordinate of the upper-left corner of the rectangular region defined by this
RectangleF .
Declaration
[Browsable(false)]
public readonly float Left { get; }
Property Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
Right
Gets the x-coordinate of the lower-right corner of the rectangular region defined by this
RectangleF.
Declaration
[Browsable(false)]
public readonly float Right { get; }
Property Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Size
Declaration
[Browsable(false)]
public SizeF Size { get; set; }
Property Value
|
Improve this Doc
View Source
Top
Gets the y-coordinate of the upper-left corner of the rectangular region defined by this
RectangleF.
Declaration
[Browsable(false)]
public readonly float Top { get; }
Property Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
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
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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)
|
Improve this Doc
View Source
Equals(RectangleF)
Returns true if two
RectangleF objects have equal location and size.
Declaration
public bool Equals(RectangleF other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
Inflate(SizeF)
Inflates this
Rect by the specified amount.
Declaration
public void Inflate(SizeF size)
Parameters
Type |
Name |
Description |
SizeF |
size |
|
|
Improve this Doc
View Source
Intersect(RectangleF)
Creates a Rectangle that represents the intersection between this Rectangle and rect.
Declaration
public void Intersect(RectangleF rect)
Parameters
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
IntersectsWith(RectangleF)
Determines if this rectangle intersects with rect.
Declaration
public bool IntersectsWith(RectangleF rect)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
Offset(PointF)
Adjusts the location of this rectangle by the specified amount.
Declaration
public void Offset(PointF pos)
Parameters
Type |
Name |
Description |
PointF |
pos |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
|
Improve this Doc
View Source
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
Operators
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
Implicit(Rect to RectangleF)
Declaration
public static implicit operator RectangleF(Rect r)
Parameters
Type |
Name |
Description |
Rect |
r |
|
Returns
|
Improve this Doc
View Source
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>