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; }
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; } }