Пример #1
0
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public override bool Equals(object obj)
        {
            if (!(obj is PointD))
            {
                return(false);
            }
            PointD comp = (PointD)obj;

            return
                (ToolMath.EqualsDouble(comp.X, X) &&
                 ToolMath.EqualsDouble(comp.Y, Y) &&
                 comp.GetType() == GetType());
        }
Пример #2
0
        /// <devdoc>
        ///    <para>
        ///       Tests whether <paramref name="obj"/> is a <see cref='System.Drawing.Rectangle'/> with
        ///       the same location and size of this Rectangle.
        ///    </para>
        /// </devdoc>
        public override bool Equals(object obj)
        {
            if (!(obj is RectangleD))
            {
                return(false);
            }

            RectangleD comp = (RectangleD)obj;

            return((ToolMath.EqualsDouble(comp.X, X)) &&
                   (ToolMath.EqualsDouble(comp.Y, Y)) &&
                   (ToolMath.EqualsDouble(comp.Width, Width)) &&
                   (ToolMath.EqualsDouble(comp.Height, Height)));
        }