示例#1
0
文件: MgFont.cs 项目: rinavin/RCJS
 /// <summary>
 /// copy constructor
 /// </summary>
 /// <param name="fromMgFont"></param>
 public MgFont(MgFont fromMgFont)
 {
     Index       = fromMgFont.Index;
     Height      = fromMgFont.Height;
     Style       = fromMgFont.Style;
     TypeFace    = fromMgFont.TypeFace;
     Orientation = fromMgFont.Orientation;
     CharSet     = fromMgFont.CharSet;
 }
示例#2
0
文件: MgFont.cs 项目: rinavin/RCJS
        /// <summary>
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(Object obj)
        {
            if (obj != null && obj is MgFont)
            {
                MgFont otherFont = (MgFont)obj;

                if (this == otherFont)
                {
                    return(true);
                }
                else
                {
                    if (
                        (Height == otherFont.Height) && (Style == otherFont.Style) && (Orientation == otherFont.Orientation) &&
                        ((TypeFace == null && otherFont.TypeFace == null) || (TypeFace.Equals(otherFont.TypeFace))) &&
                        (CharSet == otherFont.CharSet)
                        )
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }