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

Comparing ray/src/px/psign.c (file contents):
Revision 2.13 by greg, Mon Sep 21 12:14:30 1992 UTC vs.
Revision 2.16 by greg, Mon Feb 28 09:25:31 1994 UTC

# Line 140 | Line 140 | unkopt:
140                                          /* convert text to bitmap */
141          maptext();
142                                          /* print header */
143 +        newheader("RADIANCE", stdout);
144          printargs(argc, argv, stdout);
145          fputformat(COLRFMT, stdout);
146          putchar('\n');
# Line 168 | Line 169 | makemap()                      /* create the bit map */
169                          else
170                                  xsiz = ysiz/pictaspect + 0.5;
171                          cheight = ysiz/nlines;
172 <                        cwidth = cheight/aspect + 0.5;
172 >                        cwidth = cheight/aspect;
173                  } else {
174                          if (ysiz <= 0)
175                                  ysiz = cheight*nlines;
176                          pictaspect = (double)ysiz/xsiz;
177                          aspect = pictaspect*maxwidth/(256*nlines);
178                          cheight = ysiz/nlines;
179 <                        cwidth = cheight/aspect + 0.5;
179 >                        cwidth = cheight/aspect;
180                  }
181          } else {                        /* reverse orientation */
182                  if (ysiz <= 0) {
# Line 191 | Line 192 | makemap()                      /* create the bit map */
192                          else
193                                  xsiz = ysiz/pictaspect + 0.5;
194                          cheight = xsiz/nlines;
195 <                        cwidth = cheight/aspect + 0.5;
195 >                        cwidth = cheight/aspect;
196                  } else {
197                          if (xsiz <= 0)
198                                  xsiz = cheight*nlines;
199                          pictaspect = (double)ysiz/xsiz;
200                          aspect = maxwidth/(256*nlines*pictaspect);
201                          cheight = xsiz/nlines;
202 <                        cwidth = cheight/aspect + 0.5;
202 >                        cwidth = cheight/aspect;
203                  }
204          }
205          if (xsiz % SSS)
# Line 216 | Line 217 | makemap()                      /* create the bit map */
217   gettext(fp)                     /* get text from a file */
218   FILE  *fp;
219   {
219        char  *fgets();
220          char  buf[MAXLINE];
221          register LINE  *curl;
222          int  len;
# Line 239 | Line 239 | FILE  *fp;
239                  curl->s[len] = '\0';
240                  if (spacing < -1./256.)
241                          len = squeeztext(curl->sp, curl->s, ourfont,
242 <                                        (int)(spacing*-256.0));
242 >                                        (int)(spacing*-256.));
243                  else if (spacing > 1./256.)
244                          len = proptext(curl->sp, curl->s, ourfont,
245 <                                        (int)(spacing*256.0), 3);
245 >                                        (int)(spacing*256.), 3);
246                  else
247                          len = uniftext(curl->sp, curl->s, ourfont);
248                  if (len > maxwidth)
# Line 280 | Line 280 | char  *av[];
280          ourtext->sp = (short *)malloc(sizeof(short)*(maxline+1));
281          if (ourtext->sp == NULL)
282                  goto memerr;
283 <        if (spacing < 0.0)
283 >        if (spacing < -1./256.)
284                  maxwidth = squeeztext(ourtext->sp, ourtext->s, ourfont,
285 <                                (int)(spacing*-256.0));
286 <        else if (spacing > 0.0)
285 >                                (int)(spacing*-256.));
286 >        else if (spacing > 1./256.)
287                  maxwidth = proptext(ourtext->sp, ourtext->s, ourfont,
288 <                                (int)(spacing*256.0), 3);
288 >                                (int)(spacing*256.), 3);
289          else
290                  maxwidth = uniftext(ourtext->sp, ourtext->s, ourfont);
291          nlines = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines