Function:s2disp
From S2PLOT
(Difference between revisions)
Revision as of 04:40, 26 October 2007 S2plot admin (Talk | contribs) ← Previous diff |
Current revision S2plot admin (Talk | contribs) |
||
Line 1: | Line 1: | ||
=s2disp= | =s2disp= | ||
- | Draw the scene, but return control when a timeout occurs or when 'TAB' key is pressed. | + | Draw the scene, but return control when a timeout occurs or when shift-ENTER is pressed. |
==Prototype== | ==Prototype== | ||
Line 7: | Line 7: | ||
<code><pre> | <code><pre> | ||
void s2disp(int idelay, int irestorecamera); | void s2disp(int idelay, int irestorecamera); | ||
- | </code></pre> | + | </pre></code> |
==Description== | ==Description== | ||
- | Draw the scene, but return control when a timeout occurs or when the user hits the 'TAB' key. In some distributions, this capability is not available - a warning will be issued and s2show will be called implicitly. | + | Draw the scene, but return control when a timeout occurs or when the user hits the key combination: shift-ENTER. |
+ | In some distributions, this capability is not available - a warning will be issued and s2show will be called implicitly. | ||
- | If idelay = 0, the function returns immediately the event buffer is clear. | + | * If idelay = 0, the function returns immediately the event buffer is clear. |
- | + | * If idelay > 0 the function will return after this many seconds or when key is pressed. | |
- | If idelay > 0 the function will return after this many seconds or when key is pressed. | + | * If idelay < 0 there is no timeout, and the function returns when shift-ENTER is pressed. |
- | + | * If irestorecamera > 0, the camera will be returned to its "home" position, otherwise it is left in the current position. | |
- | If idelay < 0 there is no timeout, and the function returns when the 'TAB' key is pressed. | + | |
- | + | ||
- | If irestorecamera > 0, the camera will be returned to its "home" position, otherwise it is left in the current position. | + | |
Current revision
s2disp
Draw the scene, but return control when a timeout occurs or when shift-ENTER is pressed.
Prototype
void s2disp(int idelay, int irestorecamera);
Description
Draw the scene, but return control when a timeout occurs or when the user hits the key combination: shift-ENTER. In some distributions, this capability is not available - a warning will be issued and s2show will be called implicitly.
- If idelay = 0, the function returns immediately the event buffer is clear.
- If idelay > 0 the function will return after this many seconds or when key is pressed.
- If idelay < 0 there is no timeout, and the function returns when shift-ENTER is pressed.
- If irestorecamera > 0, the camera will be returned to its "home" position, otherwise it is left in the current position.
See Also
s2show | Draw the scene and enter interactive mode if interactive is non-zero. |
Code Example
#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"
int main(int argc, char *argv[])
{
int idelay = 60; /* Wait for 60 seconds */
int irestore = 1; /* Restore camera to home */
s2opend("/?",argc, argv); /* Open the display */
s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0); /* Draw coordinate box */
s2disp(idelay, irestore); /* Open the s2plot window */
return 1;
}
Back to S2PLOT function list.