Пример #1
0
        //draws the screen
        private void canvas_Paint(object sender, PaintEventArgs e)
        {
            //checks to see if the background should be drawn
            if (!transparentBackground)
            {
                e.Graphics.FillRectangle(Brushes.White, 0, 0, canvas.Width, canvas.Height);
            }

            if (background != null)
            {
                background.Draw(e.Graphics);
            }

            foreach (Layer l in layers)
            {
                l.Draw(e);
            }
        }