Exemple #1
0
        private void Dessiner(ConfigurationRevolution p_configurationRevolution, Graphics p_graphics, Pen p_pen)
        {
            if (p_configurationRevolution is null)
            {
                throw new ArgumentNullException(nameof(p_configurationRevolution));
            }

            if (p_graphics is null)
            {
                throw new ArgumentNullException(nameof(p_graphics));
            }

            List <PointF> pointsLignes = DessinRevolution.GenererPoints(p_configurationRevolution);

            p_graphics.DrawLines(p_pen, pointsLignes.ToArray());
        }
Exemple #2
0
        private void DessinerKoch(ConfigurationRevolution p_configurationRevolution, Graphics p_graphics, Pen p_pen)
        {
            if (p_configurationRevolution is null)
            {
                throw new ArgumentNullException(nameof(p_configurationRevolution));
            }

            if (p_graphics is null)
            {
                throw new ArgumentNullException(nameof(p_graphics));
            }

            List <PointF> pointsLignes = DessinRevolution.GenererPoints(p_configurationRevolution);

            pointsLignes = DessinRevolution.SubDiviserKock(pointsLignes, p_configurationRevolution.NombreIterationKock);
            pointsLignes = DessinRevolution.Recentrer(pointsLignes, pCanvas.Width, pCanvas.Height);

            p_graphics.DrawLines(p_pen, pointsLignes.ToArray());
        }