Partilhar via


Viewport Constructor (Int32, Int32, Int32, Int32)

Creates an instance of this object.

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
)
public:
Viewport(
         int x,
         int y,
         int width,
         int height
)

Parameters

  • x
    Type: Int32
    The x coordinate of the upper-left corner of the viewport in pixels.
  • y
    Type: Int32
    The y coordinate of the upper-left corner of the viewport in pixels.
  • width
    Type: Int32
    The width of the viewport in pixels.
  • height
    Type: Int32
    The height of the viewport in pixels.

Requirements

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

See Also

Reference

Viewport Structure
Viewport Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows Phone