Resizing the Graphics Window
Resizing the Graphics Window
Partiview can run at any screen size you wish. In this section, we will discuss how to change the size of this window and how to separate the GUI from the Graphics Window, allowing you to run Partiview full screen without the appearance of the GUI.
Changing the Window Size
The window size can be set to your liking using the winsize command. This command takes the arguments xsize and an optional [ysize]. Start a Partiview session and let's experiment. If we type
winsizePartiview will report the current window size. To set the size, supply the xsize and ysize arguments; for example,
winsize 400 400sets the window to be square. We mentioned that the ysize argument was optional. If left out, the same aspect ratio is maintained when given a new xsize. Try decreasing the window size with an xsize of 200, and see if the window remains square.
winsize 200The window does indeed remain square--Partiview reports a window size of 200 by 200.
Setting the Window Location
The location of the Graphics Window on your screen is set using the ±xpos±ypos arguments. These arguments set the location of the screen in pixels from either the top left corner (using the ‘+’ arguments) or the bottom right corner (using the ‘-’ arguments). For example, if you want the Graphics Window to appear in the upper left corner with a small space between the window and the edge of the screen, you might set the xpos to 20 and ypos to 40 in the command:
winsize 300 400 +20+40
Note that the window begins at the top of the GUI and does not include the window bar at the top that your operating system attaches on. Using a minus sign in place of the plus signs would move the window in the lower right corner of your screen.
Separating the GUI from the Graphics Window
To separate the GUI from the Graphics Window, type the command detach at the Command Line and Partiview will separate into two windows. This allows for more flexibility in distributing windows on your screen. Both winsize and detach are control commands so, if you wish to issue them in a file, you will need to preface them with the eval command.
Running Partiview Full Screen
By now, you have probably figured out how to run Partiview in full screen mode. Simply set the winsize to be your screen resolution and use detach to move the GUI off screen or minimize it to the bottom. Try this by issuing the commands
winsize xsize ysize +20+20replacing your screen resolution for the xsize and ysize arguments. You can now minimize the GUI or place it at the bottom of the screen, setting the window to be “always on top” if your operating system allows it.
detach
With the GUI minimized and out of sight, it is still possible to type commands into Partiview. You gain access to the Command Line via the [TAB] key. Let's make the window smaller using the winsize command along with [TAB] in this way:
[TAB] (sets the focus to the Command Line)This should reset the Graphics Window to be 500 by 375. This process can be used to enter any command, whether you want to change particle luminosity, the size of the Point of Interest, or the color of an object.
winsize 500
The .partiviewrc File
Your window setting, and other preferences, can be placed in a config file called .partiviewrc. Partiview reads this file on startup before reading any other files (like .cf or .speck files). Depending on your operating system, creating this file can be difficult, particularly for Windows. Windows and Macintosh consider filenames beginning with a period to be hidden system files. In Linux and IRIX, this is trivial though.
In Windows we suggest trying to save a file in a text editor. If this fails, then start a DOS prompt and type edit .partiviewrc, which will start a rudimentary text editor in DOS. Type your command(s) and save the file. Then, to see the file in Windows, you will have to set the folder preference “View hidden files and folders” since Windows assigns any file beginning with a period as a hidden file.
However, once you have this file, you can place the winsize and detach commands in it to run all Partiview sessions full screen. Other commands can also be placed in this file as long as you want them to apply to all data you display. For example, you could set the field of view here, or your initial position. This file must be in the same folder that contains the Partiview executable file for it to take effect. We often use this file to start Partiview in full screen and either move the file out of the Partiview folder or rename it when we want to run in work mode.
© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott
