示例#1
0
        public void ResetData()
        {
            points["0"]      = PointF.Empty;
            source.Rectangle = points["0"].Box(50).ToRectangle();
            insert           = new RectangleF(10, 10, (float)(source.Rectangle.Width * magnificationFactor), (float)(source.Rectangle.Height * magnificationFactor));

            sourceLastLocation = points["0"];
            insertLastLocation = points["0"];

            mode = MagnifierMode.None;
        }
示例#2
0
        public void OnMouseUp(MouseEventArgs e)
        {
            if (Mode == MagnifierMode.Direct)
            {
                Mode = MagnifierMode.Indirect;

                // Fix current values.
                m_iSrcCustomLeft   = MouseX - m_iSrcWidth / 2;
                m_iSrcCustomTop    = MouseY - m_iSrcHeight / 2;
                m_iSrcCustomWidth  = m_iSrcWidth;
                m_iSrcCustomHeight = m_iSrcHeight;
            }
        }