mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 21:20:18 +08:00
Updated displayOverlay's implementation & documentation (ticket #903)
This commit is contained in:
parent
7a017973bf
commit
3a564d1ae8
@ -195,35 +195,35 @@ displayOverlay
|
||||
------------------
|
||||
Displays a text on a window image as an overlay for a specified duration.
|
||||
|
||||
.. ocv:function:: void displayOverlay(const string& name, const string& text, int delay)
|
||||
.. ocv:function:: void displayOverlay(const string& name, const string& text, int delayms CV_DEFAULT(0))
|
||||
|
||||
.. ocv:cfunction:: void cvDisplayOverlay(const char* name, const char* text, int delay)
|
||||
.. ocv:cfunction:: void cvDisplayOverlay(const char* name, const char* text, int delayms CV_DEFAULT(0))
|
||||
|
||||
:param name: Name of the window.
|
||||
|
||||
:param text: Overlay text to write on a window image.
|
||||
|
||||
:param delay: The period (in milliseconds), during which the overlay text is displayed. If this function is called before the previous overlay text timed out, the timer is restarted and the text is updated. If this value is zero, the text never disappears.
|
||||
:param delayms: The period (in milliseconds), during which the overlay text is displayed. If this function is called before the previous overlay text timed out, the timer is restarted and the text is updated. If this value is zero, the text never disappears. Optional - default 0.
|
||||
|
||||
The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time *delay*. The function does not modify the image, displayed in the window, that is, after the specified delay the original content of the window is restored.
|
||||
The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time *delayms*. The function does not modify the image, displayed in the window, that is, after the specified delay the original content of the window is restored.
|
||||
|
||||
|
||||
displayStatusBar
|
||||
--------------------
|
||||
Displays a text on the window statusbar during the specified period of time.
|
||||
|
||||
.. ocv:function:: void displayStatusBar(const string& name, const string& text, int delay)
|
||||
.. ocv:function:: void displayStatusBar(const string& name, const string& text, int delayms CV_DEFAULT(0))
|
||||
|
||||
.. ocv:cfunction:: void cvDisplayStatusBar(const char* name, const char* text, int delayms)
|
||||
.. ocv:cfunction:: void cvDisplayStatusBar(const char* name, const char* text, int delayms CV_DEFAULT(0))
|
||||
|
||||
:param name: Name of the window.
|
||||
|
||||
:param text: Text to write on the window statusbar.
|
||||
|
||||
:param delay: Duration (in milliseconds) to display the text. If this function is called before the previous text timed out, the timer is restarted and the text is updated. If this value is zero, the text never disappears.
|
||||
:param delayms: Duration (in milliseconds) to display the text. If this function is called before the previous text timed out, the timer is restarted and the text is updated. If this value is zero, the text never disappears. Optional - default 0.
|
||||
|
||||
The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time
|
||||
*delay*
|
||||
*delayms*
|
||||
. This information is displayed on the window statubar (the window must be created with the ``CV_GUI_EXPANDED`` flags).
|
||||
|
||||
createOpenGLCallback
|
||||
|
@ -142,8 +142,8 @@ CV_EXPORTS CvFont fontQt(const string& nameFont, int pointSize=-1,
|
||||
int style=CV_STYLE_NORMAL, int spacing=0);
|
||||
CV_EXPORTS void addText( const Mat& img, const string& text, Point org, CvFont font);
|
||||
|
||||
CV_EXPORTS void displayOverlay(const string& winname, const string& text, int delayms);
|
||||
CV_EXPORTS void displayStatusBar(const string& winname, const string& text, int delayms);
|
||||
CV_EXPORTS void displayOverlay(const string& winname, const string& text, int delayms CV_DEFAULT(0));
|
||||
CV_EXPORTS void displayStatusBar(const string& winname, const string& text, int delayms CV_DEFAULT(0));
|
||||
|
||||
CV_EXPORTS void saveWindowParameters(const string& windowName);
|
||||
CV_EXPORTS void loadWindowParameters(const string& windowName);
|
||||
|
@ -73,8 +73,8 @@ CVAPI(CvFont) cvFontQt(const char* nameFont, int pointSize CV_DEFAULT(-1), CvSca
|
||||
|
||||
CVAPI(void) cvAddText(const CvArr* img, const char* text, CvPoint org, CvFont *arg2);
|
||||
|
||||
CVAPI(void) cvDisplayOverlay(const char* name, const char* text, int delayms);
|
||||
CVAPI(void) cvDisplayStatusBar(const char* name, const char* text, int delayms);
|
||||
CVAPI(void) cvDisplayOverlay(const char* name, const char* text, int delayms CV_DEFAULT(0));
|
||||
CVAPI(void) cvDisplayStatusBar(const char* name, const char* text, int delayms CV_DEFAULT(0));
|
||||
|
||||
CVAPI(void) cvSaveWindowParameters(const char* name);
|
||||
CVAPI(void) cvLoadWindowParameters(const char* name);
|
||||
|
@ -927,7 +927,7 @@ void GuiReceiver::displayInfo(QString name, QString text, int delayms)
|
||||
{
|
||||
QPointer<CvWindow> w = icvFindWindowByName(name);
|
||||
|
||||
if (w && delayms > 0)
|
||||
if (w)
|
||||
w->displayInfo(text, delayms);
|
||||
}
|
||||
|
||||
@ -936,7 +936,7 @@ void GuiReceiver::displayStatusBar(QString name, QString text, int delayms)
|
||||
{
|
||||
QPointer<CvWindow> w = icvFindWindowByName(name);
|
||||
|
||||
if (w && delayms > 0)
|
||||
if (w)
|
||||
w->displayStatusBar(text, delayms);
|
||||
}
|
||||
|
||||
@ -2407,7 +2407,7 @@ void DefaultViewPort::startDisplayInfo(QString text, int delayms)
|
||||
stopDisplayInfo();
|
||||
|
||||
infoText = text;
|
||||
timerDisplay->start(delayms);
|
||||
if (delayms > 0) timerDisplay->start(delayms);
|
||||
drawInfo = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user