Commit 796795ac authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12501 from alalek:fix_qt_build

parents 3e8934de d7ac4495
...@@ -469,23 +469,23 @@ CV_IMPL void cvUpdateWindow(const char*) ...@@ -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) 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 void* pf = &f; // to suppress strict-aliasing
return *(cv::QtFont*)pf; return *(cv::QtFont*)pf;
} }
void cv::addText( const Mat& img, const String& text, Point org, const QtFont& font) void cv::addText( const Mat& img, const String& text, Point org, const QtFont& font)
{ {
CvMat _img = img; CvMat _img = cvMat(img);
cvAddText( &_img, text.c_str(), org, (CvFont*)&font); cvAddText( &_img, text.c_str(), cvPoint(org), (CvFont*)&font);
} }
void cv::addText( const Mat& img, const String& text, Point org, const String& nameFont, void cv::addText( const Mat& img, const String& text, Point org, const String& nameFont,
int pointSize, Scalar color, int weight, int style, int spacing) 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);
CvMat _img = img; CvMat _img = cvMat(img);
cvAddText( &_img, text.c_str(), org, &f); cvAddText( &_img, text.c_str(), cvPoint(org), &f);
} }
void cv::displayStatusBar(const String& name, const String& text, int delayms) void cv::displayStatusBar(const String& name, const String& text, int delayms)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment