3 This script will test highgui's window move/resize functionality
6 # name of this test and it's requirements
7 TESTNAME = "cvMoveResizeWindow"
8 REQUIRED = ["cvNamedWindow"]
11 # needed for sys.exit(int) and .works file handling
15 # check requirements and delete old flag file, if it exists
16 if not works.check_files(REQUIRED,TESTNAME):
19 # import the necessary things for OpenCV
21 from python.highgui import *
22 from python.cv import *
25 cvNamedWindow(TESTNAME, CV_WINDOW_AUTOSIZE)
27 # move the window around
28 cvMoveWindow(TESTNAME, 0, 0)
29 cvMoveWindow(TESTNAME, 100, 0)
30 cvMoveWindow(TESTNAME, 100, 100)
31 cvMoveWindow(TESTNAME, 0, 100)
35 cvResizeWindow(TESTNAME, i*100, i*100)
38 cvDestroyWindow(TESTNAME)
40 # create flag file for following tests
41 works.set_file(TESTNAME)