Example #1
0
        public override Figure CloneInstance(bool keepLocation)
        {
            Point pos;
            if (keepLocation == true)
            {
                pos = new Point(this.m_ptPosition.X, this.m_ptPosition.Y);
            }
            else
            {
                pos = new Point(this.m_ptPosition.X  +20, this.m_ptPosition.Y);
            }

             Color fillColor = Color.Empty;
            try
            {
                fillColor = this.FillColor;
            }
            catch
            {
                fillColor = Color.Empty;
            }

            Cercle fig = new Cercle(pos, this.m_nRayon, fillColor, this.m_colTrait, this.m_nEpaisseur, this.m_bRempli,null);

            return fig;
        }
Example #2
0
        public override Figure CloneInstance(bool keepLocation)
        {
            Point pos;

            if (keepLocation == true)
            {
                pos = new Point(this.m_ptPosition.X, this.m_ptPosition.Y);
            }
            else
            {
                pos = new Point(this.m_ptPosition.X + 20, this.m_ptPosition.Y);
            }

            Color fillColor = Color.Empty;

            try
            {
                fillColor = this.FillColor;
            }
            catch
            {
                fillColor = Color.Empty;
            }


            Cercle fig = new Cercle(pos, this.m_nRayon, fillColor, this.m_colTrait, this.m_nEpaisseur, this.m_bRempli, null);

            return(fig);
        }