/// <summary> /// Changes parameters of a window dynamically. /// </summary> /// <param name="winName">Name of the window.</param> /// <param name="propId">Window property to retrieve.</param> /// <param name="propValue">New value of the window property.</param> public static void SetWindowProperty(string winName, WindowPropertyFlags propId, double propValue) { if (string.IsNullOrEmpty(winName)) { throw new ArgumentException("null or empty string.", nameof(winName)); } NativeMethods.HandleException( NativeMethods.highgui_setWindowProperty(winName, (int)propId, propValue)); }
/// <summary> /// Provides parameters of a window. /// </summary> /// <param name="winName">Name of the window.</param> /// <param name="propId">Window property to retrieve.</param> /// <returns></returns> public static double GetWindowProperty(string winName, WindowPropertyFlags propId) { if (string.IsNullOrEmpty(winName)) { throw new ArgumentException("null or empty string.", nameof(winName)); } NativeMethods.HandleException( NativeMethods.highgui_getWindowProperty(winName, (int)propId, out var ret)); return(ret); }