示例#1
0
        public InkNodeSelectionService(
            InkCanvas _inkCanvas,
            Canvas _selectionCanvas,
            InkAsyncAnalyzer _analyzer,
            InkStrokesService _strokeService,
            InkSelectionRectangleService _selectionRectangleService)
        {
            // Initialize properties
            inkCanvas                 = _inkCanvas;
            selectionCanvas           = _selectionCanvas;
            inkPresenter              = inkCanvas.InkPresenter;
            analyzer                  = _analyzer;
            strokeService             = _strokeService;
            selectionRectangleService = _selectionRectangleService;

            // selection on tap
            inkCanvas.Tapped       += InkCanvas_Tapped;
            inkCanvas.DoubleTapped += InkCanvas_DoubleTapped;

            //drag and drop
            inkCanvas.PointerPressed += InkCanvas_PointerPressed;

            inkPresenter.StrokesErased += InkPresenter_StrokesErased;
        }
示例#2
0
 public InkTransformService(Canvas drawingCanvas, InkStrokesService strokeService)
 {
     _drawingCanvas = drawingCanvas;
     _strokeService = strokeService;
     _inkAnalyzer   = new InkAnalyzer();
 }
        public InkSelectionRectangleService(InkCanvas _inkCanvas, Canvas _selectionCanvas, InkStrokesService _strokeService)
        {
            selectionCanvas = _selectionCanvas;
            inkCanvas       = _inkCanvas;
            strokeService   = _strokeService;

            inkCanvas.ManipulationMode       = ManipulationModes.TranslateX | ManipulationModes.TranslateY;
            inkCanvas.ManipulationStarted   += InkCanvas_ManipulationStarted;
            inkCanvas.ManipulationDelta     += InkCanvas_ManipulationDelta;
            inkCanvas.ManipulationCompleted += InkCanvas_ManipulationCompleted;
        }
示例#4
0
 public InkFileService(InkCanvas _inkCanvas, InkStrokesService _strokesService)
 {
     inkCanvas      = _inkCanvas;
     strokesService = _strokesService;
 }
示例#5
0
 public InkCopyPasteService(InkStrokesService _strokesService)
 {
     strokesService = _strokesService;
 }
示例#6
0
        public InkLassoSelectionService(InkCanvas _inkCanvas, Canvas _selectionCanvas, InkStrokesService _strokeService, InkSelectionRectangleService _selectionRectangleService)
        {
            // Initialize properties
            inkPresenter              = _inkCanvas.InkPresenter;
            selectionCanvas           = _selectionCanvas;
            strokeService             = _strokeService;
            selectionRectangleService = _selectionRectangleService;

            // lasso selection
            inkPresenter.StrokeInput.StrokeStarted += StrokeInput_StrokeStarted;
            inkPresenter.StrokesErased             += InkPresenter_StrokesErased;
        }