Rect Rect Rect Rect Constructors

Definition

Overloads

Rect(Point, Point) Rect(Point, Point) Rect(Point, Point) Rect(Point, Point)

Initializes a Rect struct that is exactly large enough to contain the two specified points.

Rect(Point, Size) Rect(Point, Size) Rect(Point, Size)

Initializes a Rect struct based on an origin and size.

Rect(Double, Double, Double, Double) Rect(Double, Double, Double, Double) Rect(Double, Double, Double, Double) Rect(Double, Double, Double, Double)

Initializes a Rect struct that has the specified x-coordinate, y-coordinate, width, and height.

Remarks

This struct represents the .NET projection of the Windows Runtime (WinRT) Rect struct. For more information, see Rect in the UWP API reference.

Rect(Point, Point) Rect(Point, Point) Rect(Point, Point) Rect(Point, Point)

Initializes a Rect struct that is exactly large enough to contain the two specified points.

public:
 Rect(Windows::Foundation::Point point1, Windows::Foundation::Point point2);
public Rect (Windows.Foundation.Point point1, Windows.Foundation.Point point2);
new Windows.Foundation.Rect : Windows.Foundation.Point * Windows.Foundation.Point -> Windows.Foundation.Rect
Public Sub New (point1 As Point, point2 As Point)

Parameters

point1
Point Point Point Point

The first point that the new rectangle must contain.

point2
Point Point Point Point

The second point that the new rectangle must contain.

Rect(Point, Size) Rect(Point, Size) Rect(Point, Size)

Initializes a Rect struct based on an origin and size.

public:
 Rect(Windows::Foundation::Point location, Windows::Foundation::Size size);
public Rect (Windows.Foundation.Point location, Windows.Foundation.Size size);
new Windows.Foundation.Rect : Windows.Foundation.Point * Windows.Foundation.Size -> Windows.Foundation.Rect

Parameters

location
Point Point Point Point

The origin of the new Rect.

size
Size Size Size Size

The size of the new Rect.

Rect(Double, Double, Double, Double) Rect(Double, Double, Double, Double) Rect(Double, Double, Double, Double) Rect(Double, Double, Double, Double)

Initializes a Rect struct that has the specified x-coordinate, y-coordinate, width, and height.

public:
 Rect(double x, double y, double width, double height);
public Rect (double x, double y, double width, double height);
new Windows.Foundation.Rect : double * double * double * double -> Windows.Foundation.Rect
Public Sub New (x As Double, y As Double, width As Double, height As Double)

Parameters

x
Double Double Double Double

The x-coordinate of the top-left corner of the rectangle.

y
Double Double Double Double

The y-coordinate of the top-left corner of the rectangle.

width
Double Double Double Double

The width of the rectangle.

height
Double Double Double Double

The height of the rectangle.

Exceptions

Applies to