From 97ccee56283ad92118153f0cd1036d1ea07ba115 Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Tue, 29 Jun 2021 23:55:34 +0300 Subject: [PATCH] minor fix - added: move_window_cv() function --- src/image_opencv.cpp | 11 +++++++++++ src/image_opencv.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/image_opencv.cpp b/src/image_opencv.cpp index f9615cb0..2524f159 100644 --- a/src/image_opencv.cpp +++ b/src/image_opencv.cpp @@ -385,6 +385,17 @@ extern "C" void resize_window_cv(char const* window_name, int width, int height) } // ---------------------------------------- +extern "C" void move_window_cv(char const* window_name, int x, int y) +{ + try { + cv::moveWindow(window_name, x, y); + } + catch (...) { + cerr << "OpenCV exception: create_window_cv \n"; + } +} +// ---------------------------------------- + extern "C" void destroy_all_windows_cv() { try { diff --git a/src/image_opencv.h b/src/image_opencv.h index 3aeb4478..19d16e1d 100644 --- a/src/image_opencv.h +++ b/src/image_opencv.h @@ -48,6 +48,7 @@ image mat_to_image_cv(mat_cv *mat); // Window void create_window_cv(char const* window_name, int full_screen, int width, int height); void resize_window_cv(char const* window_name, int width, int height); +void move_window_cv(char const* window_name, int x, int y); void destroy_all_windows_cv(); int wait_key_cv(int delay); int wait_until_press_key_cv();