Grabber::setWindowSize Method |
|||||||||||||||||
Sets the size of the video window. | |||||||||||||||||
Syntax: | bool setWindowSize( long width, long height ); |
||||||||||||||||
|
|||||||||||||||||
Return value: | true on success, false otherwise. |
||||||||||||||||
Remarks: | The size of the live video window can only be set, if Grabber::getDefaultWindowPosition returns false. If an application wants to alter the size of the live video window, it should call Grabber::setDefaultWindowPosition(false) first. |
||||||||||||||||
Sample: | This example demonstrates how to set the size of the grabber's live video window. long width = 150; long height = 100; // Check whether the window position and size can be set if( grabber.getDefaultWindowPosition() == true ) { printf("Default window position is enabled.\n"); printf("It is not possible to set the window position and size now!\n"); } else { if( grabber.setWindowSize( width, height ) == true ) { printf("New window size is %d %d\n", width, height); } else { printf("Failed to set the new window size!\n"); } } |
||||||||||||||||
See also: | Grabber, Grabber::setWindowPosition, Grabber::getWindowPosition, Grabber::setDefaultWindowPosition, Grabber::getDefaultWindowPosition |