Exemple #1
0
        private void Init()
        {
            Words.GetWords();
            canvas          = new Bitmap(picCanvas.Width, picCanvas.Height);
            picCanvas.Image = canvas;
            grGallows       = Graphics.FromImage(canvas);
            brush           = new SolidBrush(Color.Green);

            GallowsDrawing.DefineGallowElementsPositions();
            DrawGallows(0);
        }
Exemple #2
0
        private void DrawGallows(int nrOfMisses)
        {
            Point[] pts;
            // Make the GraphicsPath.
            GraphicsPath polygon_path = new GraphicsPath(FillMode.Winding);

            for (int i = 0; i < nrOfMisses; i++)
            {
                pts = GallowsDrawing.GetPoint(i).ToArray();
                polygon_path.Reset();
                polygon_path.AddPolygon(pts);
                grGallows.FillPolygon(brush, pts);
            }
        }