Function:s2opend

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 04:19, 26 October 2007
S2plot admin (Talk | contribs)

← Previous diff
Revision as of 04:28, 26 October 2007
S2plot admin (Talk | contribs)

Next diff →
Line 1: Line 1:
-=s2opend =+=s2opend=
Open the S2PLOT device (device string version). Open the S2PLOT device (device string version).
-== Prototype ==+==Prototype==
<code><pre> <code><pre>
int s2opend(char *device, int argc, char **argv); int s2opend(char *device, int argc, char **argv);
-</pre></code>+</code></pre>
-== Description ==+==Description==
-== See Also ==+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.
-[[Function:s2opendo | s2opendo]]+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.
-== PGPLOT Equivalent ==+== See Also ==
 +<table>
 +<tr><td>[[Function:s2open | Open the S2PLOT device. ]]</td></tr>
 +<tr><td>[[Function:s2opendo | Open the S2PLOT device (device string version, ignoring command line arguments). ]]</td></tr>
 +</table>
-[http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGOPEN PGOPEN ]+==PGPLOT Equivalent== [http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGOPEN PGOPEN]
- +
-== Code Example ==+
 +==Code Example==
<code><pre> <code><pre>
 +#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;
 +}
</pre></code> </pre></code>
- 
[[S2PLOT:Function List | Back]] to S2PLOT function list. [[S2PLOT:Function List | Back]] to S2PLOT function list.
__NOTOC__ __NOTOC__
__NOEDITSECTION__ __NOEDITSECTION__

Revision as of 04:28, 26 October 2007

s2opend

Open the S2PLOT device (device string version).

Prototype

int s2opend(char *device, int argc, char **argv);
</code>

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

Open the S2PLOT device.
Open the S2PLOT device (device string version, ignoring command line arguments).

==PGPLOT Equivalent== PGOPEN

Code Example

<code>
#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.


Personal tools