Exemplo n.º 1
0
        public bool HitTest(Point mousePos)
        {
            Rectangle curBounds = new Rectangle(0, 0, bmpHandle.Width, bmpHandle.Height);

            for (short i = 0; i < 8; i++)
            {
                curBounds.X = handlePos[i].X;
                curBounds.Y = handlePos[i].Y;
                if (curBounds.Contains(mousePos))
                {
                    selectedHandle = (eHandle)i;
                    mouseOffsetX   = (short)(handlePos[i].X - mousePos.X);
                    mouseOffsetY   = (short)(handlePos[i].Y - mousePos.Y);
                    SetCursor();
                    return(true);
                }
            }
            if (!isStandardCursor)
            {
                Cursor.Current   = Cursors.Default;
                isStandardCursor = true;
            }

            return(false);
        }
Exemplo n.º 2
0
        public bool HitTest(Point mousePos)
        {
            Rectangle curBounds = new Rectangle(0,0,bmpHandle.Width,bmpHandle.Height);
            for (short i = 0; i < 8; i++)
            {
                curBounds.X = handlePos[i].X;
                curBounds.Y = handlePos[i].Y;
                if (curBounds.Contains(mousePos))
                {
                    selectedHandle = (eHandle)i;
                    mouseOffsetX = (short)(handlePos[i].X - mousePos.X);
                    mouseOffsetY = (short)(handlePos[i].Y - mousePos.Y);
                    SetCursor();
                    return true;
                }

            }
            if (!isStandardCursor)
            {
                Cursor.Current = Cursors.Default;
                isStandardCursor = true;
            }

            return false;
        }