Class RECT
The RECT structure defines the coordinates of the upper-left and lower-right corners of a rectangle.
Inheritance
Namespace: Syncfusion.Windows.Shared
Assembly: Syncfusion.Shared.WPF.dll
Syntax
public sealed class RECT : ValueType
Constructors
RECT(Int32, Int32, Int32, Int32)
Initializes a new instance of the RECT struct.
Declaration
public RECT(int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | The x-coordinate of the upper-left corner of the rectangle. |
System.Int32 | top | The y-coordinate of the upper-left corner of the rectangle. |
System.Int32 | right | The x-coordinate of the lower-right corner of the rectangle. |
System.Int32 | bottom | The y-coordinate of the lower-right corner of the rectangle. |
RECT(Point, Point)
Initializes a new instance of the RECT struct.
Declaration
public RECT(Point lefttop, Point rightbottom)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Point | lefttop | System.Windows.Point that represents upper-left corner of the rectangle. |
System.Windows.Point | rightbottom | System.Windows.Point that represents lower-right corner of the rectangle. |
RECT(Rect)
Initializes a new instance of the RECT struct.
Declaration
public RECT(Rect r)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Rect | r | The rect value. |
Fields
bottom
Specifies the y-coordinate of the lower-right corner of the rectangle.
Declaration
public int bottom
Field Value
Type |
---|
System.Int32 |
left
Specifies the x-coordinate of the upper-left corner of the rectangle.
Declaration
public int left
Field Value
Type |
---|
System.Int32 |
right
Specifies the x-coordinate of the lower-right corner of the rectangle.
Declaration
public int right
Field Value
Type |
---|
System.Int32 |
top
Specifies the y-coordinate of the upper-left corner of the rectangle.
Declaration
public int top
Field Value
Type |
---|
System.Int32 |
Properties
Size
Gets actual size of the rectangle.
Declaration
public Size Size { get; }
Property Value
Type |
---|
System.Windows.Size |
Methods
FromXYWH(Int32, Int32, Int32, Int32)
Creates new RECT from given parameters.
Declaration
public static RECT FromXYWH(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The x coordinate of the upper-left corner. |
System.Int32 | y | The y coordinate of the upper-left corner. |
System.Int32 | width | Given width. |
System.Int32 | height | Given height. |
Returns
Type | Description |
---|---|
RECT | A new RECT. |