示例#1
0
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);
}
示例#2
0
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);
}
示例#3
0
文件: window.cpp 项目: 112000/opencv
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);
}
示例#4
0
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;
}