Rectangle.Rectangle Method (Microsoft.Xna.Framework)

Creates a new instance of Rectangle struct, with the specified location and size.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • C#
  • VB
  • F#
public Rectangle(
	Point location, 
	Point size

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: Microsoft.Xna.Framework.Point
The x and y coordinates of the top-left corner of the created Rectangle.
Type: Microsoft.Xna.Framework.Point
The width and height of the created Rectangle.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop