Function:ss2tsc

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:25, 4 December 2007
S2plot admin (Talk | contribs)

← Previous diff
Current revision
S2plot admin (Talk | contribs)

Line 5: Line 5:
<code><pre> <code><pre>
- +void ss2tsc(char *whichscreens);
</pre></code> </pre></code>

Current revision

ss2tsc

Enable/disable 2-d screen coordinates.

Prototype

void ss2tsc(char *whichscreens);

Description

Set which screen coordinates to draw in, can be any of 'c', 'l' or 'r', or a combination of same. Empty string means return to world coordinates.

See Also

s2opendOpen the S2PLOT device.

Code Example

#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"

int main(int argc, char *argv[])
{
   fprintf(stderr,"Try /s2mono and /s2passv modes to see differences\n");

   s2opend("/?", argc, argv);             /* Open in mono mode */
   s2swin(-1.,1., -1.,1., -1.,1.);        /* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);  /* Draw coordinate box */

   ss2tsc("r");                         /* Right eye screen coordinates */
   s2textxy(0.1,0.1,0.1,"Right eye\n");

   ss2tsc("l");                         /* Left eye screen coordinates */
   s2textxy(0.1,0.1,0.1,"Left eye\n");

   ss2tsc("c");                         /* Main screen - non stereo mode */
   s2textxy(0.2,0.5,0.1,"Main screen\n");

   ss2tsc("clr");
   s2textxy(0.2,0.7,0.1,"Everywhere!\n");

   ss2tsc("");                          /* Leave screen coordinate mode */
   s2textxy(0.0,0.0,0,"World coordinates\n");

   s2show(1);                                   /* Open the s2plot window */

   return 1;
}

Back to S2PLOT function list.