Search Results for

    Show / Hide Table of Contents

    Class RectangleF

    Stores the location and size of a rectangular region.
    Inheritance
    System.Object
    RectangleF
    Implements
    System.IEquatable<RectangleF>
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public sealed class RectangleF : ValueType

    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
    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

    Tests whether this RectangleF has a Width or a Height of 0.
    Declaration
    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
    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
    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
    public float Right { get; }
    Property Value
    Type Description
    System.Single

    Size

    Gets or sets the size of this RectangleF.
    Declaration
    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
    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)

    Tests whether obj is a RectangleF with the same location and size of this RectangleF.
    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean

    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()

    Gets the hash code for this RectangleF.
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    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
    Type Name Description
    RectangleF a
    RectangleF b
    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()

    Converts the Location and Size of this RectangleF to a human-readable string.
    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Union(RectangleF, RectangleF)

    Creates a rectangle that represents the union between a and b.
    Declaration
    public static RectangleF Union(RectangleF a, RectangleF b)
    Parameters
    Type Name Description
    RectangleF a
    RectangleF b
    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
    Type Name Description
    RectangleF left
    RectangleF right
    Returns
    Type Description
    System.Boolean

    Implicit(Rect to RectangleF)

    Converts the specified Rect to a 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
    Type Name Description
    RectangleF left
    RectangleF right
    Returns
    Type Description
    System.Boolean

    Implements

    System.IEquatable<>
    In This Article
    Back to top Generated by DocFX