Пример #1
0
 private void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             NativeMethods.cvDestroyWindow(name);
             mouseCallback = null;
             drawCallback  = null;
             if (trackbars != null)
             {
                 trackbars.Clear();
                 trackbars = null;
             }
             disposed = true;
         }
     }
 }
Пример #2
0
 internal static extern void cvSetMouseCallback(string window_name, _CvMouseCallback on_mouse, IntPtr param);
Пример #3
0
 /// <summary>
 /// Assigns a callback for mouse events.
 /// </summary>
 /// <param name="onMouse">
 /// The callback method that will handle mouse events of this named window.
 /// </param>
 public void SetMouseCallback(MouseCallback onMouse)
 {
     mouseCallback = (evt, x, y, flags, param) => onMouse(evt, x, y, flags);
     NativeMethods.cvSetMouseCallback(name, mouseCallback, IntPtr.Zero);
 }