Exemplo n.º 1
0
        protected override void MouseMoved(MouseButtons bt, Point p)
        {
            if (_prev != PEMPTY)
            {
                Pic.LClearSquare(_prev, Width);
            }

            byte c;

            if (bt == System.Windows.Forms.MouseButtons.Left)
            {
                c = _colorA;
            }
            else if (bt == System.Windows.Forms.MouseButtons.Right)
            {
                c = _colorB;
            }
            else
            {
                Pic.LDrawSquare(p, _colorA, Width);
                return;
            }

            if (_prev == PEMPTY || IsNear(_prev, p))
            {
                Pic.DrawSquare(p.X, p.Y, c, Width);
            }
            else
            {
                Pic.DrawSquareLine(_prev, p, c, Width);
            }
        }