Export (0) Print
Expand All

Viewport Structure

Defines the window dimensions of a render-target surface onto which a 3D volume projects.

Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)

public struct Viewport

The Viewport type exposes the following members.

  NameDescription
Public methodViewport(Rectangle)Creates an instance of this object.
Public methodViewport(Int32, Int32, Int32, Int32)Initializes a new instance of the Viewport class.
Top

  NameDescription
Public propertyAspectRatioGets the aspect ratio used by the viewport
Public propertyBoundsGets the size of this resource.
Public propertyHeightGets or sets the height dimension of the viewport on the render-target surface, in pixels.
Public propertyMaxDepthGets or sets the maximum depth of the clip volume.
Public propertyMinDepthGets or sets the minimum depth of the clip volume.
Public propertyWidthGets or sets the width dimension of the viewport on the render-target surface, in pixels.
Public propertyXGets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface.
Public propertyYGets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface.
Top

  NameDescription
Public Extension MethodProjectProjects a 3D vector from object space into screen space. (Defined by ViewportExtensions.)
Public Extension MethodUnprojectConverts a screen space point into a corresponding point in world space. (Defined by ViewportExtensions.)
Top

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2015 Microsoft