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

Comparing ray/src/rt/text.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:41:47 1989 UTC vs.
Revision 1.5 by greg, Thu Jan 3 11:54:54 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1990 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 89 | Line 89 | RAY  *r;
89  
90                                  /* first, discover position in text */
91          ap = m->oargs.farg;
92 <        v[0] = r->rop[0] - ap[0];
93 <        v[1] = r->rop[1] - ap[1];
94 <        v[2] = r->rop[2] - ap[2];
92 >        if (r->rox != NULL)
93 >                multp3(v, r->rop, r->rox->b.xfm);
94 >        else
95 >                VCOPY(v, r->rop);
96 >        v[0] -= ap[0];
97 >        v[1] -= ap[1];
98 >        v[2] -= ap[2];
99          col = x = DOT(v, ap+3) / DOT(ap+3, ap+3);
100          lno = y = DOT(v, ap+6) / DOT(ap+6, ap+6);
101          x -= col;
# Line 159 | Line 163 | int  col;
163                          txt[1] = NULL;
164                  } else {                                /* text file */
165                          if ((s = getpath(tm->oargs.sarg[tndx(tm)],
166 <                                        libpath)) == NULL) {
166 >                                        libpath, R_OK)) == NULL) {
167                                  sprintf(errmsg, "cannot find text file \"%s\"",
168                                                  tm->oargs.sarg[tndx(tm)]);
169                                  error(USER, errmsg);
# Line 210 | Line 214 | char  *fname;
214                  if (!strcmp(f->name, fname))
215                          return(f);
216                                                  /* load the font file */
217 <        if ((pathname = getpath(fname, libpath)) == NULL) {
217 >        if ((pathname = getpath(fname, libpath, R_OK)) == NULL) {
218                  sprintf(errmsg, "cannot find font file \"%s\"", fname);
219                  error(USER, errmsg);
220          }
# Line 274 | Line 278 | GLYPH  *gl;
278  
279          if (x < 0.0 || y < 0.0)
280                  return(0);
281 <        xlb = x *= 255.0;               /* get glyph coordinates */
282 <        ylb = y *= 255.0;
281 >        x *= 256.0;                     /* get glyph coordinates */
282 >        y *= 256.0;
283 >        xlb = x + 0.5;
284 >        ylb = y + 0.5;
285          n = *gl++;                      /* get # of vertices */
286          p0 = gl + 2*(n-1);              /* connect last to first */
287          p1 = gl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines