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.5 by greg, Tue Jun 16 16:27:37 1992 UTC vs.
Revision 2.6 by greg, Tue Jun 16 16:48:39 1992 UTC

# Line 38 | Line 38 | int  direct = 'r';                     /* direction (right, up, left, do
38  
39   int  cheight = 32*SSS;                  /* character height */
40   double  aspect = 1.67;                  /* height/width character aspect */
41 + double  spacing = 0.0;                  /* character spacing */
42   int  cwidth;                            /* computed character width */
43  
44   unsigned char  *ourbitmap;              /* our output bitmap */
# Line 115 | Line 116 | char  *argv[];
116                  case 'a':                       /* aspect ratio */
117                          aspect = atof(argv[++an]);
118                          break;
119 +                case 's':                       /* spacing */
120 +                        spacing = atof(argv[++an]);
121 +                        break;
122                  default:;
123   unkopt:
124                          fprintf(stderr, "%s: unknown option: %s\n",
# Line 191 | Line 195 | FILE  *fp;
195                          maxline = len;
196                  strncpy(curl->s, buf, len);
197                  curl->s[len] = '\0';
198 < len = uniftext(curl->sp, curl->s, ourfont);
198 >                if (spacing < 0.0)
199 >                        len = squeeztext(curl->sp, curl->s, ourfont,
200 >                                        (int)(spacing*-256.0));
201 >                else if (spacing > 0.0)
202 >                        len = proptext(curl->sp, curl->s, ourfont,
203 >                                        (int)(spacing*256.0), 3);
204 >                else
205 >                        len = uniftext(curl->sp, curl->s, ourfont);
206                  if (len > maxwidth)
207                          maxwidth = len;
208                  curl->next = ourtext;
# Line 227 | Line 238 | char  *av[];
238          ourtext->sp = (short *)malloc(sizeof(short)*(maxline+1));
239          if (ourtext->sp == NULL)
240                  goto memerr;
241 < maxwidth = squeeztext(ourtext->sp, ourtext->s, ourfont, 50);
241 >        if (spacing < 0.0)
242 >                maxwidth = squeeztext(ourtext->sp, ourtext->s, ourfont,
243 >                                (int)(spacing*-256.0));
244 >        else if (spacing > 0.0)
245 >                maxwidth = proptext(ourtext->sp, ourtext->s, ourfont,
246 >                                (int)(spacing*256.0), 3);
247 >        else
248 >                maxwidth = uniftext(ourtext->sp, ourtext->s, ourfont);
249          nlines = 1;
250          return;
251   memerr:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines