--- ray/src/rt/text.c 2021/11/19 22:51:31 2.28 +++ ray/src/rt/text.c 2024/12/03 19:36:58 2.30 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: text.c,v 2.28 2021/11/19 22:51:31 greg Exp $"; +static const char RCSid[] = "$Id: text.c,v 2.30 2024/12/03 19:36:58 greg Exp $"; #endif /* * text.c - functions for text patterns and mixtures. @@ -113,21 +113,22 @@ do_text( return(1); } } else if (m->otype == PAT_BTEXT) { - if (foreground) - scalecolor(r->pcol, m->oargs.farg[9]); - else - scalecolor(r->pcol, m->oargs.farg[10]); + if (foreground) { + scalescolor(r->pcol, m->oargs.farg[9]); + } else { + scalescolor(r->pcol, m->oargs.farg[10]); + } } else { /* PAT_CTEXT */ - COLOR cval; + SCOLOR scval; if (foreground) - setcolor(cval, m->oargs.farg[9], + setscolor(scval, m->oargs.farg[9], m->oargs.farg[10], m->oargs.farg[11]); else - setcolor(cval, m->oargs.farg[12], + setscolor(scval, m->oargs.farg[12], m->oargs.farg[13], m->oargs.farg[14]); - multcolor(r->pcol, cval); + smultscolor(r->pcol, scval); } return(0); } @@ -293,7 +294,7 @@ intext( /* check to see if p is in text glyph */ x *= 255.; h = x; i = y = DOT(v, tp->down); - if (x < 0.0 || y < 0.0) + if ((x < 0.0) | (y < 0.0)) return(0); x -= (double)h; y = ((i+1) - y)*255.; @@ -327,8 +328,8 @@ inglyph( /* (x,y) within font glyph gl? */ return(0); xlb = x; ylb = y; - if (gl->left > xlb || gl->right <= xlb || /* check extent */ - gl->bottom > ylb || gl->top <= ylb) + if ((gl->left > xlb) | (gl->right <= xlb) | /* check extent */ + (gl->bottom > ylb) | (gl->top <= ylb)) return(0); xlb = xlb<<1 | 1; /* add 1/2 to test points... */ ylb = ylb<<1 | 1; /* ...so no equal comparisons */