Function:ss2qfra
From S2PLOT
Revision as of 06:24, 6 March 2008; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
ss2qfra
Query the fisheye rotation angle.
Prototype
float ss2qfra(void);
Description
Query the fisheye rotation angle in degrees.
See Also
ss2sfra | Set the fisheye rotation angle. |
Code Example
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "s2plot.h"
void cb(double *t, int *kc)
{
ss2sas(1); /* Autospin mode on */
static int lkc = 0; /* Count of key presses */
if (lkc != *kc) { /* Space bar pressed? */
ss2sfra(drand48()*90-45.0); /* Rotate the centre up */
}
float fra = ss2qfra(); /* Query fisheye rotation angle */
s2sch(5);
char string[32];
sprintf(string,"Fisheye angle = %.2f",fra); /* Write to string */
s2textxy(0,0,0,string); /* Display text */
lkc = *kc; /* Update count */
}
int main(int argc, char *argv[])
{
fprintf(stderr,"Press <spacebar> to change fisheye rotation angle\n");
srand48((long)time(NULL)); /* Seed random numbers */
s2opend("/S2FISH",argc, argv); /* Open the display: fisheye */
s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
ss2tc(0); /* Don't allow translation */
cs2scb(cb); /* Install dynamic callback */
s2show(1); /* Open the s2plot window */
return 1;
}
Back to S2PLOT function list.