xwi - Window on screen
Name
xwi — Window on screen
Syntax
xwi [stereo | del | sel] [pixels] | [xpixels ypixels] [con] [tk] [exist] [toplevel | top] [fullscreen | fsc] [xyscale]
When a graphical standalone window is generated there are a few manipulation commands that can be used to control the behavior:
xwi min | max | fullscr
Description
Handling of display window and its parameters in the graphical screen. The graphical display window is called an xwindow or just window.
Arguments
stereo
The graphic window will be stereo-enabled.
del [1 | 2 | 3 ...]
Delete (remove) the last graphic window [or xwindow number 1/2/3/...].
pixels
Create an quadratic window display with sides pixels pixels.
xpixels ypixels
Create a window display sized xpixels times ypixels pixels.
sel number
Select xwindow number.
con number
Camera is connected to xwindow number.
exist number | name
Check if an xwindow exists by its number or name. The result is placed in the return code [gvar rc] and as a Tcl return code (0 or 1) using [xwi exist name] .
Example of checking if a window exists
xwi exist 3
set doesexist [gvar rc]
#will set the variable $doesexist to 1 if the xwindow does exist, and -1 if not existing.
subframes no_of_subframes
Set the number of sub frames for doing motion blur. The default is zero. Once this is set greater than one, you will no longer see a new frame for every Render(). If you set this to five, you will need to do five Render() invocations before seeing the result. This is not very impressive unless something is changing between the Renders.
toplevel | top
To get a toplevel stand alone window.
fullscreen | fsc
To get a toplevel fullscreen stand alone window.
xyscale scale | off
scale : To establish a specific plot scale in the current graphical window; like 1:scale. The window will be set into 2D mode and the zoom button will be disabled. To enable the zoom button go into 3D mode.
off : Turn off the scale. Will enable the zoom button.
min
Will minimize the window.
max
Will maximize the window.
fullscr
Will maximize the window to absolute max size without any toolbar. One can use the Esc button to switch back to normal.
Examples
Ex.1: Setting a specific scale on a graphical window
win demo ;# get the demo window xwi xyscale 100000 ;# establish scale 1:100000 mak ran 11 ;# 11 random points grp 111 111 ;# make a grid map ;# map the grid sma i 250 can ans 2 ;# spline map axe tic ;# dra axes tx2 lle col bla txt "Scale 1:100000"
The above example produces a similar image.
The demo window plotted in scale 1:100000
Ex.2: Plotting the Atlantis grid in scale 1:20 000 000
# Setting scale xwi xyscale 20000000 ;# scale 1: 20 000 000
The Atlantis grid plotted on the screen in scale 1:20 000 000