Function:s2opend
From S2PLOT
Revision as of 04:30, 26 October 2007 S2plot admin (Talk | contribs) ← Previous diff |
Current revision S2plot admin (Talk | contribs) |
||
Line 12: | Line 12: | ||
Open the S2PLOT device (device string version). This is like the PGPlot open function, which allows for setting the device via the environment, via standard input when the program is run, or via an explicit setting in the code. Options are: | Open the S2PLOT device (device string version). This is like the PGPlot open function, which allows for setting the device via the environment, via standard input when the program is run, or via an explicit setting in the code. Options are: | ||
- | /S2MONO - mono device, windowed | + | |
- | /S2MONOF - mono device, full screen if possible | + | */S2MONO - mono device, windowed |
- | /S2PASSV - passive stereo device, windowed (not for projection) | + | */S2MONOF - mono device, full screen if possible |
- | /S2PASSVF - passive stereo device, full screen if possible | + | */S2PASSV - passive stereo device, windowed (not for projection) |
- | /S2ACTIV - active stereo device, windowed | + | */S2PASSVF - passive stereo device, full screen if possible |
- | /S2ACTIVF - active stereo device, full screen if possible | + | */S2ACTIV - active stereo device, windowed |
- | /S2FISH - fisheye projection, windowed | + | */S2ACTIVF - active stereo device, full screen if possible |
- | /S2FISHF - fisheye projection, full screen if possible | + | */S2FISH - fisheye projection, windowed |
- | /S2TRUNCB - truncated-base fisheye, windowed display | + | */S2FISHF - fisheye projection, full screen if possible |
- | /S2TRUNCBF - truncated-base fisheye, full screen if possible | + | */S2TRUNCB - truncated-base fisheye, windowed display |
- | /S2TRUNCT - truncated-top fisheye, windowed display | + | */S2TRUNCBF - truncated-base fisheye, full screen if possible |
- | /S2TRUNCTF - truncated-top fisheye, full-screen if possible | + | */S2TRUNCT - truncated-top fisheye, windowed display |
- | /S2ANA - anaglyph stereo (red(L), blue(R)), windowed | + | */S2TRUNCTF - truncated-top fisheye, full-screen if possible |
- | /S2ANAF - anaglyph stereo (red(L), blue(R)), full screen if possible | + | */S2ANA - anaglyph stereo (red(L), blue(R)), windowed |
- | /S2DSANA - anaglyph stereo (red(L), blue(R)), pre-desaturated, windowed | + | */S2ANAF - anaglyph stereo (red(L), blue(R)), full screen if possible |
- | /S2DSANAF - anaglyph stereo (red(L), blue(R)), pre-desaturated, full-screen | + | */S2DSANA - anaglyph stereo (red(L), blue(R)), pre-desaturated, windowed |
+ | */S2DSANAF - anaglyph stereo (red(L), blue(R)), pre-desaturated, full-screen | ||
+ | |||
If the device string is given as blank or empty, then the value of the environment variable S2PLOT_DEV will be used, and should be set to one of the above. If this value is not found, then the behaviour is as for "/?" described below. | If the device string is given as blank or empty, then the value of the environment variable S2PLOT_DEV will be used, and should be set to one of the above. If this value is not found, then the behaviour is as for "/?" described below. | ||
Current revision
s2opend
Open the S2PLOT device (device string version).
Prototype
int s2opend(char *device, int argc, char **argv);
Description
Open the S2PLOT device (device string version). This is like the PGPlot open function, which allows for setting the device via the environment, via standard input when the program is run, or via an explicit setting in the code. Options are:
- /S2MONO - mono device, windowed
- /S2MONOF - mono device, full screen if possible
- /S2PASSV - passive stereo device, windowed (not for projection)
- /S2PASSVF - passive stereo device, full screen if possible
- /S2ACTIV - active stereo device, windowed
- /S2ACTIVF - active stereo device, full screen if possible
- /S2FISH - fisheye projection, windowed
- /S2FISHF - fisheye projection, full screen if possible
- /S2TRUNCB - truncated-base fisheye, windowed display
- /S2TRUNCBF - truncated-base fisheye, full screen if possible
- /S2TRUNCT - truncated-top fisheye, windowed display
- /S2TRUNCTF - truncated-top fisheye, full-screen if possible
- /S2ANA - anaglyph stereo (red(L), blue(R)), windowed
- /S2ANAF - anaglyph stereo (red(L), blue(R)), full screen if possible
- /S2DSANA - anaglyph stereo (red(L), blue(R)), pre-desaturated, windowed
- /S2DSANAF - anaglyph stereo (red(L), blue(R)), pre-desaturated, full-screen
If the device string is given as blank or empty, then the value of the environment variable S2PLOT_DEV will be used, and should be set to one of the above. If this value is not found, then the behaviour is as for "/?" described below.
If the device string is given as "/?" then the user will be prompted for their choice when the program is run. The default choice will be the value of S2PLOT_DEV if it contains a valid device.
See Also
s2open | Open the S2PLOT device. |
s2opendo | Open the S2PLOT device (device string version, ignoring command line arguments). |
PGPLOT Equivalent
Code Example
#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"
int main(int argc, char *argv[])
{
s2opend("/?", argc, argv); /* Prompt for display type */
s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0); /* Draw coordinate box */
s2show(1); /* Open the s2plot window */
return 1;
}
Back to S2PLOT function list.