ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.2 by root, Sun Aug 15 08:04:45 2004 UTC vs.
Revision 1.3 by root, Sun Aug 15 21:55:45 2004 UTC

195 if (color == Color_bg) 195 if (color == Color_bg)
196 XClearArea (d.display->display, d, x, y, w, h, FALSE); 196 XClearArea (d.display->display, d, x, y, w, h, FALSE);
197 else if (color >= 0) 197 else if (color >= 0)
198 { 198 {
199#if XFT 199#if XFT
200 XftDrawRect (d, &r->PixColors[color].c, x, y, w, h); 200 XftDrawRect (d, &r->pix_colors[color].c, x, y, w, h);
201#else 201#else
202 XSetForeground (d.display->display, TGC, r->PixColors[color]); 202 XSetForeground (d.display->display, TGC, r->pix_colors[color]);
203 XFillRectangle (d.display->display, d, TGC, x, y, w, h); 203 XFillRectangle (d.display->display, d, TGC, x, y, w, h);
204#endif 204#endif
205 } 205 }
206} 206}
207 207
266 const text_t *text, int len, 266 const text_t *text, int len,
267 int fg, int bg) 267 int fg, int bg)
268{ 268{
269 clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); 269 clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg);
270 270
271 XSetForeground (d.display->display, TGC, r->PixColors[fg]); 271 XSetForeground (d.display->display, TGC, r->pix_colors[fg]);
272 272
273 while (len--) 273 while (len--)
274 { 274 {
275#if ENABLE_COMBINING 275#if ENABLE_COMBINING
276 compose_char *cc; 276 compose_char *cc;
731 || height != r->TermWin.fheight; 731 || height != r->TermWin.fheight;
732 732
733 int base = r->TermWin.fbase; 733 int base = r->TermWin.fbase;
734 734
735 XGCValues v; 735 XGCValues v;
736 v.foreground = r->PixColors[fg]; 736 v.foreground = r->pix_colors[fg];
737 v.font = f->fid; 737 v.font = f->fid;
738 738
739 if (enc2b) 739 if (enc2b)
740 { 740 {
741 const XChar2b *xc = enc_xchar2b (text, len, cs, slow); 741 const XChar2b *xc = enc_xchar2b (text, len, cs, slow);
742 742
743 if (bg == Color_bg && !slow) 743 if (bg == Color_bg && !slow)
744 { 744 {
745 v.background = r->PixColors[bg]; 745 v.background = r->pix_colors[bg];
746 XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); 746 XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v);
747 XDrawImageString16 (d.display->display, d, TGC, x, y + base, xc, len); 747 XDrawImageString16 (d.display->display, d, TGC, x, y + base, xc, len);
748 } 748 }
749 else 749 else
750 { 750 {
772 { 772 {
773 const char *xc = enc_char (text, len, cs, slow); 773 const char *xc = enc_char (text, len, cs, slow);
774 774
775 if (bg == Color_bg && !slow) 775 if (bg == Color_bg && !slow)
776 { 776 {
777 v.background = r->PixColors[bg]; 777 v.background = r->pix_colors[bg];
778 XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); 778 XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v);
779 XDrawImageString (d.display->display, d, TGC, x, y + base, xc, len); 779 XDrawImageString (d.display->display, d, TGC, x, y + base, xc, len);
780 } 780 }
781 else 781 else
782 { 782 {
967 clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); 967 clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg);
968 968
969 if (!slow && width == r->TermWin.fwidth && 0) 969 if (!slow && width == r->TermWin.fwidth && 0)
970 { 970 {
971 if (sizeof (text_t) == sizeof (FcChar16)) 971 if (sizeof (text_t) == sizeof (FcChar16))
972 XftDrawString16 (d, &r->PixColors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len); 972 XftDrawString16 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len);
973 else 973 else
974 XftDrawString32 (d, &r->PixColors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar32 *)text, len); 974 XftDrawString32 (d, &r->pix_colors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar32 *)text, len);
975 } 975 }
976 else 976 else
977 { 977 {
978 while (len) 978 while (len)
979 { 979 {
985 985
986 XGlyphInfo extents; 986 XGlyphInfo extents;
987 if (sizeof (text_t) == sizeof (FcChar16)) 987 if (sizeof (text_t) == sizeof (FcChar16))
988 { 988 {
989 XftTextExtents16 (d.display->display, f, (const FcChar16 *)text, 1, &extents); 989 XftTextExtents16 (d.display->display, f, (const FcChar16 *)text, 1, &extents);
990 XftDrawString16 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, 990 XftDrawString16 (d, &r->pix_colors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2,
991 y + r->TermWin.fbase, (const FcChar16 *)text, 1); 991 y + r->TermWin.fbase, (const FcChar16 *)text, 1);
992 } 992 }
993 else 993 else
994 { 994 {
995 XGlyphInfo extents; 995 XGlyphInfo extents;
996 XftTextExtents32 (d.display->display, f, (const FcChar32 *)text, 1, &extents); 996 XftTextExtents32 (d.display->display, f, (const FcChar32 *)text, 1, &extents);
997 XftDrawString32 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, 997 XftDrawString32 (d, &r->pix_colors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2,
998 y + r->TermWin.fbase, (const FcChar32 *)text, 1); 998 y + r->TermWin.fbase, (const FcChar32 *)text, 1);
999 } 999 }
1000 } 1000 }
1001 1001
1002 x += r->TermWin.fwidth; 1002 x += r->TermWin.fwidth;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines