Back to index

radiance  4R0+20100331
Defines | Functions | Variables
plot4.c File Reference
#include "rtprocess.h"
#include "meta.h"
#include "plot.h"

Go to the source code of this file.

Defines

#define OUTFILT   "pexpand +OCIms" /* output filter */
#define SEGNAME   "plot4seg" /* segment name */

Functions

static void plot4 (FILE *fp)
static void doseg (int n)
int main (int argc, char *argv[])

Variables

static const char RCSid [] = "$Id: plot4.c,v 1.4 2003/11/15 02:13:37 schorsch Exp $"
FILE * pout
char * progname

Define Documentation

#define OUTFILT   "pexpand +OCIms" /* output filter */

Definition at line 16 of file plot4.c.

#define SEGNAME   "plot4seg" /* segment name */

Definition at line 18 of file plot4.c.


Function Documentation

void doseg ( int  n) [static]

Definition at line 80 of file plot4.c.

{
       switch (n) {
       case 0:                            /* upper left */
              pprim(PSEG, 0, 0, XYSIZE/2, XYSIZE/2-1, XYSIZE-1, SEGNAME);
              break;
       case 1:                            /* upper right */
              pprim(PSEG, 0, XYSIZE/2, XYSIZE/2, XYSIZE-1, XYSIZE-1, SEGNAME);
              break;
       case 2:                            /* lower left */
              pprim(PSEG, 0, 0, 0, XYSIZE/2-1, XYSIZE/2-1, SEGNAME);
              break;
       case 3:                            /* lower right, end page */
              pprim(PSEG, 0, XYSIZE/2, 0, XYSIZE-1, XYSIZE/2-1, SEGNAME);
              pglob(PEOP, 0200, NULL);
              break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 30 of file plot4.c.

{
       FILE  *fp;
       int  i;

       progname = argv[0];

       pout = popen(OUTFILT, "w");

       if (argc > 1)
              for (i = 1; i < argc; i++) {
                     fp = efopen(argv[i], "r");
                     plot4(fp);
                     fclose(fp);
              }
       else
              plot4(stdin);
       
       pglob(PEOF, 0200, NULL);

       return(pclose(pout));
}

Here is the call graph for this function:

void plot4 ( FILE *  fp) [static]

Definition at line 58 of file plot4.c.

{
       static int  nplts = 0;
       PRIMITIVE  curp;

       pglob(POPEN, 0, SEGNAME);

       while (readp(&curp, fp))
              if (curp.com == PEOP) {
                     pglob(PCLOSE, 0200, NULL);
                     doseg(nplts++ % 4);
                     pglob(POPEN, 0, SEGNAME);
              } else
                     writep(&curp, pout);
       
       pglob(PCLOSE, 0200, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

FILE* pout

Definition at line 14 of file primout.c.

char* progname

Definition at line 23 of file plot4.c.

const char RCSid[] = "$Id: plot4.c,v 1.4 2003/11/15 02:13:37 schorsch Exp $" [static]

Definition at line 2 of file plot4.c.