Rect::Rect(INT,INT,INT,INT) method (gdiplustypes.h)

Creates a Rect object by using four integers to initialize the X, Y, Width, and Height data members.

Syntax

void Rect(
  [in] INT x,
  [in] INT y,
  [in] INT width,
  [in] INT height
);

Parameters

[in] x

Type: INT

Integer used to initialize the x-coordinate of the upper-left corner of the rectangle.

[in] y

Type: INT

Integer used to initialize the y-coordinate of the upper-left corner of the rectangle.

[in] width

Type: INT

Integer used to initialize the width of this rectangle.

[in] height

Type: INT

Integer used to initialize the height of this rectangle.

Return value

None

Requirements

   
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplustypes.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Pens, Lines, and Rectangles

Rect

Rect Constructors

RectF

Using a Pen to Draw Lines and Rectangles