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.15 by greg, Fri Jun 4 17:02:48 1993 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines