[q-lang-cvs] q/modules/ggi ggi.c,1.10,1.11
Brought to you by:
agraef
From: <ag...@us...> - 2003-12-20 21:41:30
|
Update of /cvsroot/q-lang/q/modules/ggi In directory sc8-pr-cvs1:/tmp/cvs-serv24153 Modified Files: ggi.c Log Message: more bug fixes in text renderer Index: ggi.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/ggi/ggi.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ggi.c 20 Dec 2003 21:29:36 -0000 1.10 --- ggi.c 20 Dec 2003 21:41:27 -0000 1.11 *************** *** 1471,1484 **** int i = r+p; if (bufp[p]) { ! #if 1 ! /* for now we just do shades of the foreground color -- is this ! the right way to do it? */ ! col[i].r = ((long)fgcol.r)*bufp[p]/0xff; ! col[i].g = ((long)fgcol.g)*bufp[p]/0xff; ! col[i].b = ((long)fgcol.b)*bufp[p]/0xff; ! col[i].a = ((long)fgcol.a)*bufp[p]/0xff; ! #else ! /* here's an alternative implementation: blend fg with bg color ! -- but this looks odd with some fg/bg combinations */ col[i].r = (((long)fgcol.r)*bufp[p]+ ((long)bgcol.r)*(0xff-bufp[p]))/0xff; --- 1471,1476 ---- int i = r+p; if (bufp[p]) { ! /* blend fg with bg color -- this looks odd with some fg/bg ! combinations, is there a better way to do this? */ col[i].r = (((long)fgcol.r)*bufp[p]+ ((long)bgcol.r)*(0xff-bufp[p]))/0xff; *************** *** 1489,1493 **** col[i].a = (((long)fgcol.a)*bufp[p]+ ((long)bgcol.a)*(0xff-bufp[p]))/0xff; - #endif } --- 1481,1484 ---- |