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, cvScalar(color), weight, style, spacing); CvMat _img = cvMat(img); cvAddText( &_img, text.c_str(), cvPoint(org), &f); }
CvFont cv::fontQt(const std::string& nameFont, int pointSize, Scalar color, int weight, int style, int /*spacing*/) { return cvFontQt(nameFont.c_str(), pointSize,color,weight, style); }
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); return *(cv::QtFont*)(&f); }
cv::QtFont cv::fontQt(const String& nameFont, int pointSize, Scalar color, int weight, int style, int spacing) { CvFont f = cvFontQt(nameFont.c_str(), pointSize, cvScalar(color), weight, style, spacing); void* pf = &f; // to suppress strict-aliasing return *(cv::QtFont*)pf; }