Creates awindow that cycles through a sequence of images.
parent (optional) The widget or shell ID of the parent widget (long). If parent is not specified, WgMovieTool runs on its own (i.e., in its own event loop).
rate (optional) Minimum cycling speed, specified in frames per second; the exact cycling speed varies depending on system load. (This number corresponds to the numeral "1" underneath the speed slider.) By default, under "optimum" conditions, the rate is 30 frames per second (if Pixmap is present and nonzero) or 3 frames per second (if Pixmap is not supplied or is equal to zero).
windowid (optional) The window ID of the PV-WAVE graphics window. (For information on window IDs, see the description for the WINDOW procedure.)
Dims A three-element vector specifying the size of the images to be read from the file, and the number of images to read. The elements of the vector are [m, n, n_frames], where (m,n) is the size of an individual image, and n_frames is the total number of frames in the sequence.
Do_tvscl Indicates that TVSCL should be used to scale the image values to the current color table.
0 Specifies TV is used instead (no scaling).
Maximum The maximum cycling speed, specified in frames per second; the exact cycling speed varies depending on system load. (This number corresponds to the label to the right of the speed slider.) If Maximum is not specified, the maximum rate is 100 frames per second (if Do_tvscl is not supplied or is equal to zero) or 10 frames per second (if Do_tvscl is present and nonzero).
Order The order in which the image is drawn. If present and nonzero, the image is inverted. In other words, the image is drawn from bottom to top instead of from top to bottom.
Pixmap Indicates that pixmaps should be used for the animation.
0 Specifies the data is stored in a variable.
Popup If present and nonzero, the MovieTool widget is displayed in its own Main window.
Background Specifies the background color name.
Bottom If a widget ID is specified (for example,
Bottom=wid
), then the bottom of the color bar widget is attached to the top of the specified widget. If no widget ID is specified (for example, /Bottom
), then the bottom of the movie widget is attached to the bottom of the parent widget.Left=wid
), then the left side of the movie widget is attached to the right side of the specified widget. If no widget ID is specified (for example, /Left
), then the left side of the movie widget is attached to the left side of the parent widget.Right=wid
), then the right side of the movie widget is attached to the left side of the specified widget. If no widget ID is specified (for example, /Right
), then the right side of the movie widget is attached to the right side of the parent widget.Top=wid
), then the top of the movie widget is attached to the bottom of the specified widget. If no widget ID is specified (for example, /Top
), then the top of the movie widget is attached to the top of the parent widget.
Figure 2-157 WgMovieTool creates an interactive window that lets you use the mouse to control the pace and direction of an animated series of images.
Figure 2-158 WgMovieTool creates an interactive window that lets you use the mouse to control the pace and direction of an animated series of images.
movie.pro
. Unlike the blocking behavior that you encounter with movie.pro, you can interact with other windows while MovieTool is open and running.
You can use the output parameter windowid to keep track of the PV-WAVE window ID that is assigned to the MovieTool. You can create multiple instances of the MovieTool; each one will be assigned a different PV-WAVE window ID.
NOTE: Use the window manager menu of the window frame to dismiss the MovieTool window from the screen.
parent
is defined, WgMovieTool is created as a child of parent
; otherwise, WgMovieTool runs on its own (i.e., in its own event loop).When you are finished interacting with the WgMovieTool window, close it using the window manager menu.
PRO Sample_wgmovietool, parent, tool_shell heart = BYTARR(256, 256, 15)
IF !Version.platform EQ 'VMS' THEN $ OPENR, u, GETENV('WAVE_DIR')+$ '[data]heartbeat.dat', /Get_lun $ ENDIF ELSE BEGIN OPENR, u, !Dir+'/data/heartbeat.dat', /Get_lun ENDELSE READU, u, heart
CLOSE, u FREE_LUN, u
IF N_ELEMENTS(parent) NE 0 THEN BEGIN WgMovieTool, heart, parent, tool_shell, $ /Do_tvscl, /Pixmap, /Popup
ENDIF ELSE BEGIN WgMovieTool, heart, /Do_tvscl, /Pixmap
ENDELSE END
For more information about how to transfer image data to variables, refer to Input and Output of Image Data in Chapter 8 of the PV-WAVE Programmer's Guide.
For more information about pixmaps, refer to Appendix , Output Devices and Window Systems.
For more information about color table indices, refer to Experimenting with Different Color Tables in Chapter 11 of the PV-WAVE User's Guide.
For more information about how to write an application program based on WAVE Widgets, refer to Chapter 5, Using WAVE Widgets, in the PV-WAVE GUI Application Developer's Guide. For more information about how to write an application program based on the PV-WAVE Widget Toolbox, refer to Chapter 6, Using the Widget Toolbox, in the PV-WAVE GUI Application Developer's Guide.