From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom To: 9fans@cse.psu.edu, Russ Cox References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: Subject: Re: [9fans] ttf2subf Message-Id: <20060323113858.55A70104286@dexter-peak.quanstro.net> Date: Thu, 23 Mar 2006 05:38:58 -0600 Cc: Topicbox-Message-UUID: 1d6927dc-ead1-11e9-9d60-3106f5b1d025 9term and acme also use libframe. - erik "Russ Cox" writes | | > /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