Rectangle.Rectangle Method (Microsoft.Xna.Framework)

Creates a new instance of Rectangle struct, with the specified position, width, and height.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.616)
  • C#
  • VB
  • F#
public Rectangle(
	int x, 
	int y, 
	int width, 
	int height
)

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

x
Type: System.Int32
The x coordinate of the top-left corner of the created Rectangle.
y
Type: System.Int32
The y coordinate of the top-left corner of the created Rectangle.
width
Type: System.Int32
The width of the created Rectangle.
height
Type: System.Int32
The height of the created Rectangle.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web