Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MyViewport"/> struct.
 /// </summary>
 /// <param name="bounds">A bounding box that defines the location and size of the viewport in a render target.</param>
 public MyViewport(MyRectangle bounds)
 {
     X        = bounds.X;
     Y        = bounds.Y;
     Width    = bounds.Width;
     Height   = bounds.Height;
     MinDepth = 0f;
     MaxDepth = 1f;
 }
Beispiel #2
0
 /// <summary>Determines whether this rectangle entirely contains a specified rectangle.</summary>
 /// <param name="value">The rectangle to evaluate.</param>
 public bool Contains(MyRectangle value)
 {
     return((X <= value.X) && (value.Right <= Right) && (Y <= value.Y) && (value.Bottom <= Bottom));
 }