public void Complete(Vector2 startingPoint, Vector2 point, bool isOutNodeDistance)
        {
            // Selection
            if (this.Mode == ListViewSelectionMode.None)
            {
                return;
            }
            this.HandleMode = BrushHandleMode.None;

            Matrix3x2 inverseMatrix       = this.ViewModel.CanvasTransformer.GetInverseMatrix();
            Vector2   canvasStartingPoint = Vector2.Transform(startingPoint, inverseMatrix);
            Vector2   canvasPoint         = Vector2.Transform(point, inverseMatrix);

            // Snap
            if (this.IsSnap)
            {
                canvasPoint = this.Snap.Snap(canvasPoint);
                this.Snap.Default();
            }

            this.TransparencyComplete(canvasStartingPoint, canvasPoint);

            // Cursor
            CoreCursorExtension.IsManipulationStarted = false;
            CoreCursorExtension.Cross();

            this.ViewModel.Invalidate(InvalidateMode.HD); // Invalidate
        }
        private void AddComplete(Vector2 canvasPoint)
        {
            ILayer   layer    = this.CurveLayer;
            Layerage layerage = this.CurveLayerage;

            // Snap
            if (this.IsSnap)
            {
                canvasPoint = this.Snap.Snap(canvasPoint);
                this.Snap.Default();
            }


            // History
            LayersPropertyHistory history = new LayersPropertyHistory(HistoryType.LayersProperty_Set_AddNode);

            // History
            var previous = layer.Nodes.NodesClone().ToList();

            history.UndoAction += () =>
            {
                // Refactoring
                layer.IsRefactoringTransformer = true;
                layer.IsRefactoringRender      = true;
                layer.IsRefactoringIconRender  = true;
                layer.Nodes.NodesReplace(previous);
            };

            // History
            this.ViewModel.HistoryPush(history);



            Node node = new Node
            {
                Point             = canvasPoint,
                LeftControlPoint  = canvasPoint,
                RightControlPoint = canvasPoint,
                IsChecked         = false,
                IsSmooth          = false,
            };

            layer.Nodes.PenAdd(node);


            // Refactoring
            layer.IsRefactoringTransformer = true;
            layer.IsRefactoringRender      = true;
            layer.IsRefactoringIconRender  = true;
            layerage.RefactoringParentsTransformer();
            layerage.RefactoringParentsRender();
            layerage.RefactoringParentsIconRender();

            // Cursor
            CoreCursorExtension.IsManipulationStarted = false;
            CoreCursorExtension.Cross();

            this.ViewModel.Invalidate(InvalidateMode.HD); // Invalidate
        }
        private void PreviewStart(Vector2 startingPoint)
        {
            Matrix3x2 inverseMatrix = this.ViewModel.CanvasTransformer.GetInverseMatrix();
            Vector2   canvasPoint   = Vector2.Transform(startingPoint, inverseMatrix);

            if (this._hasPreviewTempLeftPoint == false)
            {
                this._previewLeft = canvasPoint;
            }
            this._previewRight = canvasPoint;

            // Cursor
            CoreCursorExtension.IsManipulationStarted = true;
            CoreCursorExtension.Cross();

            this.ViewModel.Invalidate(InvalidateMode.Thumbnail); // Invalidate
        }
        private void AddStart()
        {
            ILayer   layer    = this.CurveLayer;
            Layerage layerage = this.CurveLayerage;

            // Snap
            if (this.IsSnap)
            {
                this.ViewModel.VectorVectorSnapInitiate(layer.Nodes);
            }

            this._addEndNode  = layer.Nodes.Last(n => n.Type == NodeType.Node);
            this._addLastNode = layer.Nodes.Last(n => n.Type == NodeType.Node);

            // Cursor
            CoreCursorExtension.IsManipulationStarted = true;
            CoreCursorExtension.Cross();

            this.ViewModel.Invalidate(InvalidateMode.Thumbnail); // Invalidate
        }
        public void Started(Vector2 startingPoint, Vector2 point)
        {
            // Selection
            if (this.Mode == ListViewSelectionMode.None)
            {
                return;
            }

            // Snap
            if (this.IsSnap)
            {
                this.ViewModel.VectorBorderSnapInitiate(this.SelectionViewModel.Transformer);
            }

            this.TransparencyStarted(startingPoint, point);

            // Cursor
            CoreCursorExtension.IsManipulationStarted = true;
            CoreCursorExtension.Cross();
            this.ViewModel.Invalidate(InvalidateMode.Thumbnail); // Invalidate
        }
        private void PreviewComplete(Vector2 canvasStartingPoint, Vector2 canvasPoint, bool isOutNodeDistance)
        {
            if (this._hasPreviewTempLeftPoint)
            {
                this._hasPreviewTempLeftPoint = false;
                this.CreateLayer(this._previewLeft, canvasPoint);
            }
            else if (isOutNodeDistance)
            {
                this._hasPreviewTempLeftPoint = false;
                this.CreateLayer(canvasStartingPoint, canvasPoint);
            }
            else
            {
                this._hasPreviewTempLeftPoint = true;

                // Cursor
                CoreCursorExtension.IsManipulationStarted = false;
                CoreCursorExtension.Cross();

                this.ViewModel.Invalidate(InvalidateMode.HD); // Invalidate
            }
        }