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 2.26 by greg, Tue Jul 8 18:25:00 2014 UTC vs.
Revision 2.29 by greg, Wed Nov 15 18:02:53 2023 UTC

# Line 113 | Line 113 | do_text(
113                          return(1);
114                  }
115          } else if (m->otype == PAT_BTEXT) {
116 <                if (foreground)
117 <                        scalecolor(r->pcol, m->oargs.farg[9]);
118 <                else
119 <                        scalecolor(r->pcol, m->oargs.farg[10]);
116 >                if (foreground) {
117 >                        scalescolor(r->pcol, m->oargs.farg[9]);
118 >                } else {
119 >                        scalescolor(r->pcol, m->oargs.farg[10]);
120 >                }
121          } else { /* PAT_CTEXT */
122 <                COLOR  cval;
122 >                SCOLOR  scval;
123                  if (foreground)
124 <                        setcolor(cval, m->oargs.farg[9],
124 >                        setscolor(scval, m->oargs.farg[9],
125                                          m->oargs.farg[10],
126                                          m->oargs.farg[11]);
127                  else
128 <                        setcolor(cval, m->oargs.farg[12],
128 >                        setscolor(scval, m->oargs.farg[12],
129                                          m->oargs.farg[13],
130                                          m->oargs.farg[14]);
131 <                multcolor(r->pcol, cval);
131 >                smultscolor(r->pcol, scval);
132          }
133          return(0);
134   }
# Line 204 | Line 205 | gettext(                       /* get text structure for material */
205                                  getrlibpath(), R_OK)) == NULL) {
206                          sprintf(errmsg, "cannot find text file \"%s\"",
207                                          tm->oargs.sarg[tndx(tm)]);
208 <                        error(USER, errmsg);
208 >                        error(SYSTEM, errmsg);
209                  }
210                  if ((fp = fopen(s, "r")) == NULL) {
211                          sprintf(errmsg, "cannot open text file \"%s\"", s);
# Line 222 | Line 223 | gettext(                       /* get text structure for material */
223          tlp->next = NULL;
224                                                  /* get the font */
225          t->f = getfont(tm->oargs.sarg[fndx(tm)]);
226 +        if (!t->f)
227 +                objerror(tm, USER, "font load error");
228                                                  /* compute character spacing */
229          i = sndx(tm);
230          d = i < tm->oargs.nfargs ? tm->oargs.farg[i] : 0.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines