Function:ss2tsc

From S2PLOT

Jump to: navigation, search

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.


Personal tools