Rect Constructeurs

Définition

Surcharges

Rect(Point, Point)

Initialise un struct Rect dont la taille est exactement suffisante pour contenir les deux points spécifiés.

Rect(Point, Size)

Initialise un struct Rect selon une origine et une taille.

Rect(Double, Double, Double, Double)

Initialise un struct Rect dont les coordonnées x et y, ainsi que la largeur et la hauteur, sont spécifiées.

Remarques

Ce struct représente la projection .NET du struct Windows Runtime (WinRT) Rect . Pour plus d’informations, consultez Rect dans la référence de l’API UWP.

Rect(Point, Point)

Initialise un struct Rect dont la taille est exactement suffisante pour contenir les deux points spécifiés.

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)

Paramètres

point1
Point

Le premier point que doit contenir le nouveau rectangle.

point2
Point

Le deuxième point que doit contenir le nouveau rectangle.

S’applique à

Rect(Point, Size)

Initialise un struct Rect selon une origine et une taille.

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
Public Sub New (location As Point, size As Size)

Paramètres

location
Point

Origine du nouveau Rect.

size
Size

Taille du nouveau Rect.

S’applique à

Rect(Double, Double, Double, Double)

Initialise un struct Rect dont les coordonnées x et y, ainsi que la largeur et la hauteur, sont spécifiées.

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)

Paramètres

x
Double

Coordonnée X du coin supérieur gauche du rectangle.

y
Double

Coordonnée y du coin supérieur gauche du rectangle.

width
Double

Largeur du rectangle.

height
Double

Hauteur du rectangle.

Exceptions

Valeur width ou height inférieure à 0.

S’applique à