Beispiel #1
0
        public void OnMouseUp(Bitmap bitmap, Point mouse, Keys modifiers, Point imageLocation, float imageZoom)
        {
            // TODO: Handle magnifier.
            // TODO: Memorize the action we just finished to enable undo.
            // TODO: keep tool or change tool.
            // m_ActiveTool = m_ActiveTool.KeepTool ? m_ActiveTool : m_PointerTool;

            if (screenToolManager.IsUsingHandTool)
            {
                screenToolManager.HandTool.OnMouseUp();
                metadata.AllDrawingTextToNormalMode();
                metadata.UpdateTrackPoint(bitmap);
            }

            ImageToViewportTransformer transformer = new ImageToViewportTransformer(imageLocation, imageZoom);
            PointF imagePoint = transformer.Untransform(mouse);

            metadata.InitializeCommit(null, imagePoint);

            screenToolManager.AfterToolUse();
        }