From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] ttf2subf From: "Russ Cox" Date: Wed, 22 Mar 2006 23:36:29 -0500 In-Reply-To: <27e1103209e04bfffc4889f1be149dae@quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 1cac78bc-ead1-11e9-9d60-3106f5b1d025 > /home/quanstro/cvs/plan9/ /usr/local/plan9/src/libframe/frdraw.c:14,20 - frdraw.c:14,20 > for(nb=0,b=f->box; nbnbox; nb++, b++){ > _frcklinewrap(f, &pt, b); > if(!f->noredraw && b->nrune >= 0) > - string(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr); > + stringbg(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr, display->white, ZP); > pt.x += b->wid; > } > } who says the background is white? frinsert, the only caller of _frredraw in the library, does appear to draw the background first, at least the beginning of it. > /home/quanstro/cvs/plan9//src/libframe/frdraw.c:99,105 - frdraw.c:99,105 > x = f->r.max.x; > draw(f->b, Rect(pt.x, pt.y, x, pt.y+f->font->height), back, nil, pt); > if(b->nrune >= 0) > - stringn(f->b, pt, text, ZP, f->font, ptr, nr); > + stringnbg(f->b, pt, text, ZP, f->font, ptr, nr, display->white, ZP); > pt.x += w; > Continue: > b++; this one shouldn't be necessary. the draw call above just drew the background, which again might not be white. the right fix is to edit 9term's wrepaint. it should draw the background before calling _frredraw. it's possible that frinsert needs to be edited a little too, to make sure only to _frredraw the part whose background it just filled in with frselectpaint. i leave all this as an exercise to the interested reader. russ