Viewport Members

The following tables list the members exposed by the Viewport type.

Public Constructors

Name Description
Public Method Viewport Overloaded. Creates an instance of this class.

Public Properties

Name Description
Public Property AspectRatio Gets the aspect ratio used by the viewport
Public Property Bounds Gets the size of this resource.
Public Property Height Gets or sets the height dimension of the viewport on the render-target surface, in pixels.
Public Property MaxDepth Gets or sets the maximum depth of the clip volume.
Public Property MinDepth Gets or sets the minimum depth of the clip volume.
Public Property TitleSafeArea Returns the title safe area of the current viewport.
Public Property Width Gets or sets the width dimension of the viewport on the render-target surface, in pixels.
Public Property X Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface.
Public Property Y Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface.

Public Methods

Name Description
Public Method Equals (Inherited from ValueType.)
Public Method GetHashCode (Inherited from ValueType.)
Public Method GetType (Inherited from Object.)
Public Method Project Projects a 3D vector from object space into screen space.
Public Method ToString Retrieves a string representation of this object.
Public Method Unproject Converts a screen space point into a corresponding point in world space.

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Reference

Viewport Structure
Microsoft.Xna.Framework.Graphics Namespace