예제 #1
0
    protected override void SetEditmodeClickAndDragActions(EditmodeBase mode)
    {
        EditmodePathObject pathObject = mode as EditmodePathObject;

        switch (pathObject.mode)
        {
        case Mode.select:
            mode.SetClickFunction(_pathObjectUpdater.SelectToMove);
            mode.SetDragFunction(_pathObjectUpdater.Move); break;

        case Mode.scale:
            mode.SetClickFunction(_pathObjectUpdater.SelectToScale);
            mode.SetDragFunction(_pathObjectUpdater.Scale); break;

        case Mode.move:
            mode.SetClickFunction(_pathObjectUpdater.SelectToMove);
            mode.SetDragFunction(_pathObjectUpdater.Move); break;
        }
    }
예제 #2
0
    protected override void SetEditmodeClickAndDragActions(EditmodeBase mode)
    {
        EditmodeHandlesPoints handlesPoints = mode as EditmodeHandlesPoints;

        switch (handlesPoints.mode)
        {
        case Mode.moveHandle:
            mode.SetClickFunction(delegate { _handlePointsUpdater.SelectPathObject(); _handlePointsUpdater.SelectBezierSegment(HandlesPointsUpdater.SelectionMode.Handle); });
            mode.SetDragFunction(delegate { _handlePointsUpdater.UpdateCurrentBezierHandles(); }); break;

        case Mode.movePoint:
            mode.SetClickFunction(delegate { _handlePointsUpdater.SelectPathObject(); _handlePointsUpdater.SelectBezierSegment(HandlesPointsUpdater.SelectionMode.Point); });
            mode.SetDragFunction(_handlePointsUpdater.MovePoint);
            break;

        case Mode.select:
            mode.SetClickFunction(_handlePointsUpdater.SelectPathObject);
            break;
        }
    }