private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { ClearSelection(); inkCanvas.InkPresenter.UnprocessedInput.PointerPressed -= UnprocessedInput_PointerPressed; inkCanvas.InkPresenter.UnprocessedInput.PointerMoved -= UnprocessedInput_PointerMoved; inkCanvas.InkPresenter.UnprocessedInput.PointerReleased -= UnprocessedInput_PointerReleased; }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { ClearSelection(); MainInkCanvas.InkPresenter.UnprocessedInput.PointerPressed -= UnprocessedInput_PointerPressed; MainInkCanvas.InkPresenter.UnprocessedInput.PointerMoved -= UnprocessedInput_PointerMoved; MainInkCanvas.InkPresenter.UnprocessedInput.PointerReleased -= UnprocessedInput_PointerReleased; }
private void StrokeInput_StrokeContinued(InkStrokeInput sender, PointerEventArgs args) { // Coge el punto por el que ha pasado el cursor pulsado Point point = new Point(args.CurrentPoint.Position.X, args.CurrentPoint.Position.Y); // Lo añade a la lista de puntos points.Add(point); // Si la lista tiene más de un punto if (points.Count > 1) { // Creau una lista de InkPoints a partir de la lista de puntos, necesaria para hacer el stroke List <InkPoint> inkpoints = new List <InkPoint>(); foreach (Point p in points) { inkpoints.Add(new InkPoint(p, 0.5f)); } // Crea el stroke a partir de los inkpoints InkStroke stroke = strokeBuilder.CreateStrokeFromInkPoints(inkpoints, System.Numerics.Matrix3x2.Identity); // Copia los atributos de dibujado (color y eso) del canvas original InkDrawingAttributes ida = canvas.InkPresenter.CopyDefaultDrawingAttributes(); stroke.DrawingAttributes = ida; // Guarda el ultimo punto Point ultimo = points.Last <Point>(); // Vacía la lista de puntos y le añade el ultimo del anterior stroke, para que el dibujado no de "saltos" points = new List <Point>(); points.Add(ultimo); } }
private void StrokeInput_StrokeStarted1(InkStrokeInput sender, PointerEventArgs args) { if (timerStopped == true) { } else { timer.Interval = new System.TimeSpan(0, 0, 2); initPos = args.CurrentPoint.Position; timer.Tick += Timer_Tick; timer.Start(); while (timerStopped == true) { ; } var finPos = args.CurrentPoint.Position; var finMag = Math.Pow(((finPos.X * finPos.X) + (finPos.Y * finPos.Y)), 0.5); var initMag = Math.Pow(((initPos.X * initPos.X) + (initPos.Y * initPos.Y)), 0.5); if (finMag - initMag < 15) { canvasX.InkPresenter.IsInputEnabled = false; canvasX.PointerPressed += CanvasX_PointerPressed; canvasX.PointerMoved -= CanvasX_PointerMoved1; canvasX.PointerMoved += CanvasX_PointerMoved; canvasX.PointerReleased += CanvasX_PointerReleased; } } }
private void InkPresenter_StrokeInputStarted(InkStrokeInput sender, PointerEventArgs args) { clearedStrokes.Clear(); inkCleared = false; activeTool = inkToolbar.ActiveTool; }
private void InkPresenter_StrokeInputStarted(InkStrokeInput sender, PointerEventArgs args) { ViewCanvasButton_Click(null, null); clearedStrokes.Clear(); inkCleared = false; activeTool = inkToolbar.ActiveTool; }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { IReadOnlyList<InkStroke> currentStrokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes(); foreach (InkStroke inkStroke in currentStrokes) { _core.InkPath(inkStroke.GetInkPoints()); } inkCanvas.InkPresenter.StrokeContainer.Clear(); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { IReadOnlyList <InkStroke> currentStrokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes(); foreach (InkStroke inkStroke in currentStrokes) { _core.InkPath(inkStroke.GetInkPoints()); } inkCanvas.InkPresenter.StrokeContainer.Clear(); }
private void InkPresenter_StrokeContinued(InkStrokeInput sender, PointerEventArgs args) { float pressure = ((STROKE_SIZE_MAX - STROKE_SIZE_MIN) * args.CurrentPoint.Properties.Pressure) + STROKE_SIZE_MIN; float opacity = ((STROKE_OPACITY_MAX - STROKE_OPACITY_MIN) * args.CurrentPoint.Properties.Pressure) + STROKE_OPACITY_MIN; // apply inking settings if (null != _inkCanvas) { _inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(CreateInkDrawingAttributes(pressure, opacity)); } }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { //builder.BeginStroke(args.CurrentPoint); //line = new Line(); //line.X1 = args.CurrentPoint.RawPosition.X; //line.Y1 = args.CurrentPoint.RawPosition.Y; //line.X2 = args.CurrentPoint.RawPosition.X; //line.Y2 = args.CurrentPoint.RawPosition.Y; //line.Stroke = new SolidColorBrush(Colors.Purple); //line.StrokeThickness = 4; }
private void InkPresenter_StrokeInputStarted(InkStrokeInput sender, PointerEventArgs args) { inkRecoTimer.Stop(); textToggleTimer.Stop(); int index = currentCanvas.Name.IndexOf("Canvas"); string prefix = currentCanvas.Name.Substring(0, index); clearedStrokesLists[prefix].Clear(); inkCleared = false; activeTool = inkToolbar.ActiveTool; }
/// <summary> /// Cuando el usuario realice una traza pintada, se convertira dicha traza en puntos y se mandarán al servidor para que el restro de jugadores la reciban y la procesen. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void StrokeInput_StrokeContinued(InkStrokeInput sender, PointerEventArgs args) { // Coge el punto por el que ha pasado el cursor pulsado Point point = new Point(args.CurrentPoint.Position.X, args.CurrentPoint.Position.Y); // Lo añade a la lista de puntos points.Add(point); // Si la lista tiene más de un punto if (points.Count > 1) { // Creau una lista de InkPoints a partir de la lista de puntos, necesaria para hacer el stroke List <InkPoint> inkpoints = new List <InkPoint>(); foreach (Point p in points) { inkpoints.Add(new InkPoint(p, 0.5f)); } // Crea el stroke a partir de los inkpoints InkStroke stroke = builder.CreateStrokeFromInkPoints(inkpoints, System.Numerics.Matrix3x2.Identity); // Copia los atributos de dibujado (color y eso) del canvas original InkDrawingAttributes ida = inkCanvas.InkPresenter.CopyDefaultDrawingAttributes(); stroke.DrawingAttributes = ida; // Le añadae el stroke creado al canvas de copia //canvas2.InkPresenter.StrokeContainer.AddStroke(stroke); List <clsPunto> punticos = new List <clsPunto>(); foreach (Point p in points) { punticos.Add(new clsPunto(p.X, p.Y, ida.Color, ida.Size)); } if (conn.State == ConnectionState.Connected) { proxy.Invoke("strokeDraw", punticos, viewModel.Partida.NombreSala); } // Guarda el ultimo punto Point ultimo = points.Last <Point>(); // Vacía la lista de puntos y le añade el ultimo del anterior stroke, para que el dibujado no de "saltos" points = new List <Point>(); points.Add(ultimo); } }
private void InkPresenter_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { // hide the pen icon if (!_touchHereWasHidden) { if (null != _penTouchPointGrid) { AnimationHelper.PerformFadeOut(_penTouchPointGrid, 100d, 0d); } _touchHereWasHidden = true; } // telemetry //TelemetryService.Current?.SendTelemetry(TelemetryService.TELEMETRY_STARTPEN, System.DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:ss tt", CultureInfo.InvariantCulture), true, 0); }
private void InkPresenter_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { RaisePenScreenContactStartedEvent(this); FadeInColoringImage(); float pressure = ((STROKE_SIZE_MAX - STROKE_SIZE_MIN) * args.CurrentPoint.Properties.Pressure) + STROKE_SIZE_MIN; float opacity = ((STROKE_OPACITY_MAX - STROKE_OPACITY_MIN) * args.CurrentPoint.Properties.Pressure) + STROKE_OPACITY_MIN; // apply inking settings if (null != _inkCanvas) { _inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(CreateInkDrawingAttributes(pressure, opacity)); } // telemetry TelemetryService.Current?.LogTelemetryEvent(TelemetryEvents.StartPen); }
private async void StrokeInput_StrokeEndedAsync(InkStrokeInput sender, PointerEventArgs args) { await Task.Delay(100); var XBound = InkCanvas.InkPresenter.StrokeContainer.BoundingRect.Bottom; if (XBound > InkCanvas.ActualHeight - 500) { InkCanvas.Height = XBound + 500; } var YBound = InkCanvas.InkPresenter.StrokeContainer.BoundingRect.Right; if (YBound > InkCanvas.ActualWidth - 500) { InkCanvas.Width = YBound + 500; } }
private void InkPresenter_StrokeInputStarted(InkStrokeInput sender, PointerEventArgs args) { dispatcherTimer.Stop(); int index = currentCanvas.Name.IndexOf("Canvas"); string prefix = currentCanvas.Name.Substring(0, index); var formField = this.FindName($"{prefix}") as Grid; if (formField.Tag.ToString() == "accepted") { formField.BorderBrush = new SolidColorBrush(Colors.Yellow); formField.Tag = "pending"; } clearedStrokesLists[prefix].Clear(); inkCleared = false; activeTool = inkToolbar.ActiveTool; }
private void InkPresenter_StrokeEnded(InkStrokeInput sender, PointerEventArgs args) { //// show the pen icon //if (null != _touchHereImage) //{ // AnimationHelper.PerformFadeIn(_touchHereImage, 100d, 0d); //} // change the ink color if (null != _inkCanvas) { InkDrawingAttributes inkDrawingAttributes = new InkDrawingAttributes() { Color = GetNextColor(), //FitToCurve = true, PenTip = PenTipShape.Circle, Size = new Size(WINDOW_BOUNDS.Width * 0.02, WINDOW_BOUNDS.Height * 0.02) }; _inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(inkDrawingAttributes); } // telemetry //TelemetryService.Current?.SendTelemetry(TelemetryService.TELEMETRY_ENDPEN, System.DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:ss tt", CultureInfo.InvariantCulture), true, 0); }
private void StrokeInput_StrokeEnded(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { UpdateTime(false, true); }
private void StrokeInput_StrokeEnded(InkStrokeInput sender, PointerEventArgs args) { points = new List <Point>(); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { ClearSelection(); canvasControl.Invalidate(); }
private void StrokeInput_StrokeCanceled(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { inkCanvas.InkPresenter.StrokeContainer.Clear(); }
private void StrokeInput_StrokeEnded(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { }
// Handler for the InkPresenter StrokeStarted event. // If a new stroke starts before the next timer tick event, // stop the timer as the new stroke is likely the continuation // of a single handwriting entry. private void inkCanvas_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { recoTimer.Stop(); }
private void OnStrokeStarted(InkStrokeInput sender, PointerEventArgs args) { StrokeStarted?.Invoke(sender, EventArgs.Empty); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { UpdateTime(true, false); }
public InkStrokeInputEvents(InkStrokeInput This) { this.This = This; }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { this.toolBox.Margin = new Thickness(0, -this.toolBox.ActualHeight, 0, 0); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { // Don't perform analysis while a stroke is in progress. dispatcherTimer.Stop(); }
/// <summary> /// Stops the timer if a new stroke has started /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void InkCanvas_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { recognitionTimer.Stop(); }
void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { Clear(); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { _recoTimer.Start(); }
private void StrokeInput_StrokeEnded(InkStrokeInput sender, PointerEventArgs args) { this.toolBox.Margin = new Thickness(0, 0, 0, 0); }
private void StrokeInput_StrokeEnded(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args) { // _recoTimer.Stop(); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { EndLassoSelectionConfig(); }
private void StrokeInput_StrokeStarted(InkStrokeInput sender, PointerEventArgs args) { strokeTimer.Stop(); }