ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/ra_ps.c
(Generate patch)

Comparing ray/src/px/ra_ps.c (file contents):
Revision 2.2 by greg, Mon Jul 13 09:53:14 1992 UTC vs.
Revision 2.4 by greg, Fri Aug 14 13:27:52 1992 UTC

# Line 24 | Line 24 | int  wrongformat = 0;                  /* input in wrong format? */
24   double  pixaspect = 1.0;                /* pixel aspect ratio */
25  
26   int  bradj = 0;                         /* brightness adjustment */
27 + int  ncopies = 1;                       /* number of copies */
28  
29   char  *progname;
30  
# Line 59 | Line 60 | char  *argv[];
60                                          goto userr;
61                                  bradj = atoi(argv[++i]);
62                                  break;
63 +                        case 'n':               /* number of copies */
64 +                                ncopies = atoi(argv[++i]);
65 +                                break;
66                          default:
67                                  goto userr;
68                          }
# Line 115 | Line 119 | char  *name;
119          printf("%%!\n");
120          printf("%%%%Title: %s\n", name);
121          printf("%%%%Creator: %s\n", progname);
122 <        printf("%%%%Pages: 1\n");
122 >        printf("%%%%Pages: %d\n", ncopies);
123          if (landscape = xmax > pixaspect*ymax)
124                  printf("%%%%Landscape\n");
125          else
# Line 123 | Line 127 | char  *name;
127          printf("%%%%EndComments\n");
128          printf("gsave\n");
129          printf("64 dict begin\n");
130 +                                        /* define image reader */
131 +        PSprocdef("read6bit");
132                                          /* set up transformation matrix */
133          printf("%f %f translate\n", HMARGIN, VMARGIN);
134          if (PWIDTH > PHEIGHT ^ landscape) {
# Line 143 | Line 149 | char  *name;
149          }
150          printf("%f %f translate\n", (pwidth-iwidth)*.5, (pheight-iheight)*.5);
151          printf("%f %f scale\n", iwidth, iheight);
146        PSprocdef("read6bit");
152          printf("%%%%EndProlog\n");
153 +                                        /* start image procedure */
154          printf("%d %d 8 [%d 0 0 %d 0 %d] {read6bit} image", xmax, ymax,
155                          xmax, -ymax, ymax);
156   }
# Line 153 | Line 159 | char  *name;
159   PStrailer()                     /* print PostScript trailer */
160   {
161          puts("%%Trailer");
162 <        puts("end");
162 >        if (ncopies > 1)
163 >                printf("/#copies %d def\n", ncopies);
164          puts("showpage");
165 <        puts("grestore");
165 >        puts("end");
166          puts("%%EOF");
167   }
168  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines