public virtual void ProcessPointMove(int pid, Point pt) { if (!_pts.ContainsKey(pid)) { return; } _pts[pid] = pt; UpdatePivot(); _mprocessor.ProcessMove((uint)pid, (float)pt.X, (float)pt.Y); }
/// <summary> /// The ProcessMove method feeds movement data for the target object to its manipulation processor /// </summary> /// <param name="manipulationId">The identifier for the manipulation that you want to process</param> /// <param name="location">The coordinates associated with the target</param> public void ProcessMove(uint manipulationId, PointF location) { _comManipulationProcessor.ProcessMove(manipulationId, location.X, location.Y); }
protected override void OnAttached() { _attachedElement = this.AssociatedObject; _attachedElement.PreviewStylusDown += (s, e) => { if (Container == null) { return; } MultitouchWindow.SafeCaptureStylus(e.StylusDevice, _attachedElement); e.Handled = true; Point pos = e.GetPosition(Container); UpdatePivot(); _mprocessor.ProcessDown((uint)e.StylusDevice.Id, (float)pos.X, (float)pos.Y); }; _attachedElement.PreviewStylusUp += (s, e) => { if (Container == null) { return; } MultitouchWindow.SafeCaptureStylus(e.StylusDevice, null); Point pos = e.GetPosition(Container); UpdatePivot(); _mprocessor.ProcessUp((uint)e.StylusDevice.Id, (float)pos.X, (float)pos.Y); }; _attachedElement.PreviewStylusMove += (s, e) => { if (Container == null) { return; } Point pos = e.GetPosition(Container); UpdatePivot(); _mprocessor.ProcessMove((uint)e.StylusDevice.Id, (float)pos.X, (float)pos.Y); }; _attachedElement.PreviewMouseDown += (s, e) => { if (Container == null) { return; } MultitouchWindow.SafeCaptureMouse(_attachedElement); e.Handled = true; Point pos = e.GetPosition(Container); UpdatePivot(); _mprocessor.ProcessDown(1 << 30, (float)pos.X, (float)pos.Y); }; _attachedElement.PreviewMouseUp += (s, e) => { if (Container == null) { return; } MultitouchWindow.SafeCaptureMouse(null); Point pos = e.GetPosition(Container); UpdatePivot(); _mprocessor.ProcessUp(1 << 30, (float)pos.X, (float)pos.Y); }; _attachedElement.PreviewMouseMove += (s, e) => { if (Container == null) { return; } Point pos = e.GetPosition(Container); UpdatePivot(); _mprocessor.ProcessMove(1 << 30, (float)pos.X, (float)pos.Y); }; }