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 |
|
} |
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); |
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; |
294 |
|
x *= 255.; |
295 |
|
h = x; |
296 |
|
i = y = DOT(v, tp->down); |
297 |
< |
if (x < 0.0 || y < 0.0) |
297 |
> |
if ((x < 0.0) | (y < 0.0)) |
298 |
|
return(0); |
299 |
|
x -= (double)h; |
300 |
|
y = ((i+1) - y)*255.; |
328 |
|
return(0); |
329 |
|
xlb = x; |
330 |
|
ylb = y; |
331 |
< |
if (gl->left > xlb || gl->right <= xlb || /* check extent */ |
332 |
< |
gl->bottom > ylb || gl->top <= ylb) |
331 |
> |
if ((gl->left > xlb) | (gl->right <= xlb) | /* check extent */ |
332 |
> |
(gl->bottom > ylb) | (gl->top <= ylb)) |
333 |
|
return(0); |
334 |
|
xlb = xlb<<1 | 1; /* add 1/2 to test points... */ |
335 |
|
ylb = ylb<<1 | 1; /* ...so no equal comparisons */ |