Function:s2qvp

From S2PLOT

Revision as of 07:17, 27 October 2007; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

s2qvp

Query the device viewport range.

Prototype

void s2qvp(float *dx1, float *dx2, float *dy1, float *dy2, float *dz1, float *dz2);

Description

Query the device viewport range.

See Also

s2svp Set up the part of 3D space that is used for plotting.

PGPLOT Equivalent

PGQVP

Code Example

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

int main(int argc, char *argv[])
{
   float dx1, dx2, dy1, dy2, dz1, dz2;		/* Viewport ranges */

   s2opend("/?",argc, argv);			/* Open the display */
   s2svp(-1.,1., -1.,1., -1.,1.);		/* First view port */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);	/* Draw coordinate box */

   s2qvp(&dx1,&dx2, &dy1,&dy2, &dz1,&dz2);	/* Query viewport coordinates */
   dx1 /= 2.0; dx2 /= 2.0;			/* Halve the coordintes */
   dy1 /= 2.0; dy2 /= 2.0;
   dz1 /= 2.0; dz2 /= 2.0;

   s2sci(S2_PG_RED);
   s2svp(dx1,dx2, dy1,dy2, dz1,dz2);		/* Create a half-size viewport */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);	/* Draw coordinate box */

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

Back to S2PLOT function list.


Personal tools