Example #1
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            EdgeMetrics em = new EdgeMetrics();

            em.Left   = Left;
            em.Right  = Right;
            em.Top    = Top;
            em.Bottom = Bottom;

            return(em);
        }
Example #2
0
 /// <summary>
 /// Equality
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(EdgeMetrics other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.Left == Left && other.Right == Right && other.Top == Top && other.Bottom == Bottom);
 }
Example #3
0
 /// <summary>
 /// Equality
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(EdgeMetrics other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.Left == Left && other.Right == Right && other.Top == Top && other.Bottom == Bottom;
 }
Example #4
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            EdgeMetrics em = new EdgeMetrics();
            em.Left = Left;
            em.Right = Right;
            em.Top = Top;
            em.Bottom = Bottom;

            return em;
        }
Example #5
0
 /// <summary>
 /// Collapses a rectangle
 /// </summary>
 /// <param name="edgeMetrics"></param>
 /// <returns></returns>
 public Rectangle Collapse(EdgeMetrics edgeMetrics)
 {
     return(Collapse(edgeMetrics.Left, edgeMetrics.Right, edgeMetrics.Top, edgeMetrics.Bottom));
 }
Example #6
0
 /// <summary>
 /// Expands rectangle
 /// </summary>
 /// <param name="edgeMetrics"></param>
 /// <returns></returns>
 public Rectangle Expand(EdgeMetrics edgeMetrics)
 {
     return(Expand(edgeMetrics.Left, edgeMetrics.Right, edgeMetrics.Top, edgeMetrics.Bottom));
 }
Example #7
0
 /// <summary>
 /// Expands rectangle
 /// </summary>
 /// <param name="edgeMetrics"></param>
 /// <returns></returns>
 public Rectangle Expand(EdgeMetrics edgeMetrics)
 {
     return Expand(edgeMetrics.Left, edgeMetrics.Right, edgeMetrics.Top, edgeMetrics.Bottom);
 }
Example #8
0
 /// <summary>
 /// Collapses a rectangle
 /// </summary>
 /// <param name="edgeMetrics"></param>
 /// <returns></returns>
 public Rectangle Collapse(EdgeMetrics edgeMetrics)
 {
     return Collapse(edgeMetrics.Left, edgeMetrics.Right, edgeMetrics.Top, edgeMetrics.Bottom);
 }