From d7ac4495c3d06f636d741ce93e9c25e7e084b476 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 11 Sep 2018 20:30:36 +0000 Subject: [PATCH] highgui: fix QT build --- modules/highgui/src/window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index e1e7af0ced..6df249fa81 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -469,23 +469,23 @@ CV_IMPL void cvUpdateWindow(const char*) cv::QtFont cv::fontQt(const String& nameFont, int pointSize, Scalar color, int weight, int style, int spacing) { - CvFont f = cvFontQt(nameFont.c_str(), pointSize,color,weight, style, spacing); + CvFont f = cvFontQt(nameFont.c_str(), pointSize, cvScalar(color), weight, style, spacing); void* pf = &f; // to suppress strict-aliasing return *(cv::QtFont*)pf; } void cv::addText( const Mat& img, const String& text, Point org, const QtFont& font) { - CvMat _img = img; - cvAddText( &_img, text.c_str(), org, (CvFont*)&font); + CvMat _img = cvMat(img); + cvAddText( &_img, text.c_str(), cvPoint(org), (CvFont*)&font); } void cv::addText( const Mat& img, const String& text, Point org, const String& nameFont, int pointSize, Scalar color, int weight, int style, int spacing) { - CvFont f = cvFontQt(nameFont.c_str(), pointSize,color,weight, style, spacing); - CvMat _img = img; - cvAddText( &_img, text.c_str(), org, &f); + CvFont f = cvFontQt(nameFont.c_str(), pointSize, cvScalar(color), weight, style, spacing); + CvMat _img = cvMat(img); + cvAddText( &_img, text.c_str(), cvPoint(org), &f); } void cv::displayStatusBar(const String& name, const String& text, int delayms)