Function:s2disp

From S2PLOT

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

← Previous diff
Revision as of 04:18, 4 December 2007
S2plot admin (Talk | contribs)

Next diff →
Line 11: Line 11:
==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 the 'TAB' 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 irestorecamera > 0, the camera will be returned to its "home" position, otherwise it is left in the current position.

Revision as of 04:18, 4 December 2007

s2disp

Draw the scene, but return control when a timeout occurs or when 'TAB' key 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.


Personal tools