Stores a set of four integers that represent the location and size of a rectangle
Ejemplo n.º 1
0
 public Point CenterWithin(Rectangle container)
 {
     return new Point(((container.Width - Width) >> 1) + container.X, ((container.Height - Height) >> 1) + container.Y);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Tests whether the System.Drawing.Rectangle structure has the same location and size of this System.Drawing.Rectangle structure.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(Rectangle other)
 {
     return m_X == other.m_X && m_Y == other.m_Y && m_Width == other.m_Width && m_Height == other.m_Height;
 }