Ejemplo n.º 1
0
 /// <summary>
 /// Tests to see if another extents, 'testFit', fits within this extents.
 /// </summary>
 /// <remarks>
 /// The testFit extents is checked to see whether it fits in its current orientation
 /// as well as rotated 90 degrees.  Either orientation is a valid fit.
 /// </remarks>
 /// <param name="testFit">The extents which is checked to fit inside the calling extents.</param>
 /// <returns>True if testFit fits completely within the calling extents; false otherwise.</returns>
 public bool FitsWithin(Extents testFit)
 {
     return(((testFit.Width <= Width) && (testFit.Height <= Height)) ||
            ((testFit.Height <= Width) && (testFit.Width <= Height)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// ToString override
 /// </summary>
 /// <returns>Formatted string</returns>
 public override string ToString()
 {
     return(string.Format("{0} cells @ {1}", ContainsCount, Extents.ToString()));
 }