Esempio n. 1
0
        private void ShadowPic_MouseUp(object sender, MouseEventArgs e)
        {
            Rectangle rec = PatternPB.RectangleToScreen(PatternPB.ClientRectangle);

            MyPic = new Bitmap(PatternPB.ClientSize.Width, PatternPB.ClientSize.Height);
            Graphics.FromImage(MyPic).CopyFromScreen(rec.Location, new Point(0, 0), rec.Size);
            g = PatternPB.CreateGraphics();
        }
Esempio n. 2
0
        private void Color2Btn_BackColorChanged(object sender, EventArgs e)
        {
            Rectangle rec = PatternPB.RectangleToScreen(PatternPB.ClientRectangle);

            MyPic = new Bitmap(PatternPB.ClientSize.Width, PatternPB.ClientSize.Height);
            Graphics.FromImage(MyPic).CopyFromScreen(rec.Location, new Point(0, 0), rec.Size);
            PatternPB.Refresh();
            PatternPB.BackColor = Color2Btn.BackColor;
        }
Esempio n. 3
0
        private void PatternPB_MouseUp(object sender, MouseEventArgs e)
        {
            Rectangle rec = PatternPB.RectangleToScreen(PatternPB.ClientRectangle);

            MyPic = new Bitmap(PatternPB.ClientSize.Width, PatternPB.ClientSize.Height);
            Graphics.FromImage(MyPic).CopyFromScreen(rec.Location, new Point(0, 0), rec.Size);
            Painting = false;
            Array.Resize(ref PencilPoints, 0);
            Array.Resize(ref PenTypes, 0);
        }
Esempio n. 4
0
        private void PatternPB_MouseDown(object sender, MouseEventArgs e)
        {
            if (Painting)
            {
                Painting = false;
                g.DrawImage(MyPic, 0, 0);
            }
            else if ((e.Button == MouseButtons.Left || e.Button == MouseButtons.Right) && Painter != Painters.None)
            {
                Painting = true;

                PencilPoints = new Point[1] {
                    new Point(e.X, e.Y)
                };
                PenTypes = new byte[1] {
                    0
                };
                movestart = new Point(e.X, e.Y);

                Rectangle rec = PatternPB.RectangleToScreen(PatternPB.ClientRectangle);
                MyPic = new Bitmap(PatternPB.ClientSize.Width, PatternPB.ClientSize.Height);
                Graphics.FromImage(MyPic).CopyFromScreen(rec.Location, new Point(0, 0), rec.Size);
            }
        }