public override void MouseMove(Point location) { if (m_Tracker.SupportsManualCorrections && m_State == CorrectTrackingState.Correcting) { int deltaX = location.X - m_X0; int deltaY = location.Y - m_Y0; // If correcting see if there is a location in a radius of a few pixels which fits very well with the current targets if (m_Mode == CorrectTrackingMode.All) { for (int i = 0; i < m_Tracker.TrackedObjects.Count; i++) { m_LightCurvesVideoOperation.SetManualTrackingCorrection(i, deltaX, deltaY); } } else { m_LightCurvesVideoOperation.SetManualTrackingCorrection((int)m_Mode - 1, deltaX, deltaY); } m_VideoController.RefreshCurrentFrame(); } }
internal void Initialize(ReduceLightCurveOperation videoOperation, ITracker tracker, VideoController videoController) { m_LightCurvesVideoOperation = videoOperation; m_VideoController = videoController; m_Tracker = tracker; if (m_Tracker.SupportsManualCorrections) { m_VideoController.SetPictureBoxCursor(CustomCursors.PanCursor); } m_State = CorrectTrackingState.Normal; m_Mode = CorrectTrackingMode.All; for (int i = 0; i < tracker.TrackedObjects.Count; i++) { m_LightCurvesVideoOperation.SetManualTrackingCorrection(i, 0, 0); } m_VideoController.RefreshCurrentFrame(); }