Viewport Constructor (Int32, Int32, Int32, Int32)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Initializes a new instance of the Viewport class.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)
Syntax
'Declaration
Public Sub New ( _
x As Integer, _
y As Integer, _
width As Integer, _
height As Integer _
)
public Viewport(
int x,
int y,
int width,
int height
)
Parameters
- x
Type: System.Int32
The x coordinate of the upper-left corner of the viewport in pixels.
- y
Type: System.Int32
The y coordinate of the upper-left corner of the viewport in pixels.
- width
Type: System.Int32
The width of the viewport in pixels.
- height
Type: System.Int32
The height of the viewport in pixels.
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.