コード例 #1
0
ファイル: MyViewport.cs プロジェクト: ly774508966/MyHalp
 /// <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;
 }
コード例 #2
0
ファイル: MyRectangleF.cs プロジェクト: ly774508966/MyHalp
 /// <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));
 }