2 * Copyright (c) 2007-2010 SlimDX Group
\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
\r
5 * of this software and associated documentation files (the "Software"), to deal
\r
6 * in the Software without restriction, including without limitation the rights
\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
8 * copies of the Software, and to permit persons to whom the Software is
\r
9 * furnished to do so, subject to the following conditions:
\r
11 * The above copyright notice and this permission notice shall be included in
\r
12 * all copies or substantial portions of the Software.
\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\r
26 namespace Direct3D11
\r
29 /// Defines a rectangular region of a render-target surface onto which 3D rendering is projected.
\r
31 /// <unmanaged>D3D11_VIEWPORT</unmanaged>
\r
32 public value class Viewport : System::IEquatable<Viewport>
\r
43 /// Gets or sets the viewport's X position.
\r
48 void set( float value );
\r
52 /// Gets or sets the viewport's Y position.
\r
57 void set( float value );
\r
61 /// Gets or sets the viewport's width.
\r
63 property float Width
\r
66 void set( float value );
\r
70 /// Gets or sets the viewport's height.
\r
72 property float Height
\r
75 void set( float value );
\r
79 /// Gets or sets the viewport's minimum Z depth.
\r
84 void set( float value );
\r
88 /// Gets or sets the viewport's maximum Z depth.
\r
93 void set( float value );
\r
97 /// Initializes a new instance of the <see cref="Viewport"/> structure.
\r
99 /// <param name="x">The X coordinate of the viewport.</param>
\r
100 /// <param name="y">The Y coordinate of the viewport.</param>
\r
101 /// <param name="width">The width of the viewport.</param>
\r
102 /// <param name="height">The height of the viewport.</param>
\r
103 Viewport( float x, float y, float width, float height);
\r
106 /// Initializes a new instance of the <see cref="Viewport"/> structure.
\r
108 /// <param name="x">The X coordinate of the viewport.</param>
\r
109 /// <param name="y">The Y coordinate of the viewport.</param>
\r
110 /// <param name="width">The width of the viewport.</param>
\r
111 /// <param name="height">The height of the viewport.</param>
\r
112 /// <param name="minZ">The minimum Z distance of the viewport.</param>
\r
113 /// <param name="maxZ">The maximum Z distance of the viewport.</param>
\r
114 Viewport( float x, float y, float width, float height, float minZ, float maxZ );
\r
117 /// Tests for equality between two viewports.
\r
119 /// <param name="left">The first value to compare.</param>
\r
120 /// <param name="right">The second value to compare.</param>
\r
121 /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>
\r
122 static bool operator == ( Viewport left, Viewport right );
\r
125 /// Tests for inequality between two viewports.
\r
127 /// <param name="left">The first value to compare.</param>
\r
128 /// <param name="right">The second value to compare.</param>
\r
129 /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>
\r
130 static bool operator != ( Viewport left, Viewport right );
\r
133 /// Converts the value of the viewport to its equivalent string representation.
\r
135 /// <returns>The string representation of the value of this instance.</returns>
\r
136 virtual System::String^ ToString() override;
\r
139 /// Returns the hash code for this instance.
\r
141 /// <returns>A 32-bit signed floateger hash code.</returns>
\r
142 virtual int GetHashCode() override;
\r
145 /// Returns a value indicating whether this instance is equal to the specified object.
\r
147 /// <param name="obj">An object to compare with this instance.</param>
\r
148 /// <returns><c>true</c> if <paramref name="obj"/> has the same value as this instance; otherwise, <c>false</c>.</returns>
\r
149 virtual bool Equals( System::Object^ obj ) override;
\r
152 /// Returns a value indicating whether this instance is equal to the specified object.
\r
154 /// <param name="other">A <see cref="Viewport"/> to compare with this instance.</param>
\r
155 /// <returns><c>true</c> if <paramref name="other"/> has the same value as this instance; otherwise, <c>false</c>.</returns>
\r
156 virtual bool Equals( Viewport other );
\r
159 /// Returns a value indicating whether the two viewports are equivalent.
\r
161 /// <param name="value1">The first value to compare.</param>
\r
162 /// <param name="value2">The second value to compare.</param>
\r
163 /// <returns><c>true</c> if <paramref name="value1"/> has the same value as <paramref name="value2"/>; otherwise, <c>false</c>.</returns>
\r
164 static bool Equals( Viewport% value1, Viewport% value2 );
\r