Exemplo n.º 1
0
 private void Canvas_SizeChanged(object sender, EventArgs e)
 {
     bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
     pictureBox1.Image = bmp;
     gToScreen         = Graphics.FromImage(bmp);
     DrawingApi.SetUp(gToScreen);
 }
Exemplo n.º 2
0
        private void Constructor()
        {
            this.pictureBox1.MouseDown += pictureBox1_MouseDown;
            this.pictureBox1.MouseUp   += pictureBox1_MouseUp;
            this.pictureBox1.MouseMove += pictureBox1_MouseMove;
            this.UpdateCanvas          += Canvas_UpdateCanvas;

            context          = new ContextControl();
            gToScreen        = this.CreateGraphics();
            DrawingApi.xData = new XData();
            DrawingApi.SetUp(gToScreen);
        }