private void RedrawAllShapes()
        {
            lock (bitmapArrayLock)
            {
                bitmapArray.Fill(backgroundcolor);

                bitmapArray.FillPolygon(sun, suncolor);
                bitmapArray.FillPolygon(waves1, waves1color);
                bitmapArray.FillPolygon(dolphin, dolphincolor);
                bitmapArray.FillPolygon(waves2, waves2color);
                foreach (var dolphinotherfragment in dolphinother)
                {
                    if (dolphinotherfragment.PointsCount == 3)
                    {
                        bitmapArray.FillPolygon(dolphinotherfragment, dolphincolorother1);
                    }
                    else if (dolphinotherfragment.PointsCount == 4)
                    {
                        bitmapArray.FillPolygon(dolphinotherfragment, dolphincolorother2);
                    }
                    else if (dolphinotherfragment.PointsCount == 5)
                    {
                        bitmapArray.FillPolygon(dolphinotherfragment, dolphincolorother3);
                    }
                    else
                    {
                        bitmapArray.FillPolygon(dolphinotherfragment, dolphinpatternother);
                    }
                }


                bitmapArray.FillPolygon(rect1, Colors4Ch.Red);
                bitmapArray.FillPolygon(rect2, Colors4Ch.Blue);
                foreach (var rect in rect3)
                {
                    bitmapArray.FillPolygon(rect, Colors4Ch.White);
                }

                bitmapArray.FillPolygon(trig1, Colors4Ch.Red);
                bitmapArray.FillPolygon(trig2, Colors4Ch.Blue);
                foreach (var trig in trig3)
                {
                    bitmapArray.FillPolygon(trig, Colors4Ch.White);
                }

                bitmapArray.RefreshBitmap(Mask.Disabled);

                if (reinitializeDisplayedBitmap)
                {
                    PlayerImage.Source = bitmapArray.GetBitmap(Mask.Disabled);
                    PlayerImage.Width  = bitmapArray.Width;
                    PlayerImage.Height = bitmapArray.Height;

                    reinitializeDisplayedBitmap = false;
                }
            }
        }