highgui: allow wrapping cv::addText

also correctly forward spacing parameter in fontQt
This commit is contained in:
Pavel Rojtberg
2016-10-13 18:05:48 +02:00
parent a799cc13d9
commit 8cc09f1784
2 changed files with 43 additions and 11 deletions
@@ -670,6 +670,23 @@ The function addText draws *text* on the image *img* using a specific font *font
*/
CV_EXPORTS void addText( const Mat& img, const String& text, Point org, const QtFont& font);
/** @brief Draws a text on the image.
@param img 8-bit 3-channel image where the text should be drawn.
@param text Text to write on an image.
@param org Point(x,y) where the text should start on an image.
@param nameFont Name of the font. The name should match the name of a system font (such as
*Times*). If the font is not found, a default one is used.
@param pointSize Size of the font. If not specified, equal zero or negative, the point size of the
font is set to a system-dependent default value. Generally, this is 12 points.
@param color Color of the font in BGRA where A = 255 is fully transparent.
@param weight Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.
@param style Font style. Available operation flags are : cv::QtFontStyles
@param spacing Spacing between characters. It can be negative or positive.
*/
CV_EXPORTS_W void addText(const Mat& img, const String& text, Point org, const String& nameFont, int pointSize = -1, Scalar color = Scalar::all(0),
int weight = QT_FONT_NORMAL, int style = QT_STYLE_NORMAL, int spacing = 0);
/** @brief Displays a text on a window image as an overlay for a specified duration.
The function displayOverlay displays useful information/tips on top of the window for a certain