List of all members.
Static Public Methods
|template<class T> util::Thread *||display (const util::Matrix< T > &img, bool waitUserInput=false, std::string title="PRAPI Image Display") throw (XException&)|
|Display an image on an X window. |
Display an image on an X window.
A window is created on the default display, with its default visual. If the waitUserInput flag is set to true, the call blocks until a key or a mouse button is pressed, and NULL is returned. If it is false, a separate thread is created, which waits until the window closes. A pointer to this thread is returned. The caller is responsible for joining the thread (Thread::join()) and for deleting the pointer. An exception is thrown if an error occurs. Make sure that the depth of the given color (or gray-scale) values is eight bits. An example:
Matrix<Color<int,3> > clrImg(...); Thread* thread = XWindows::display(clrImg); thread.join(); delete thread;