Mercurial > hg > xemacs-beta
comparison src/redisplay-x.c @ 373:6240c7796c7a r21-2b2
Import from CVS: tag r21-2b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:04:06 +0200 |
parents | cc15677e0335 |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
372:49e1ed2d7ed8 | 373:6240c7796c7a |
---|---|
691 else | 691 else |
692 gcv.background = XINT (bg); | 692 gcv.background = XINT (bg); |
693 mask |= GCBackground; | 693 mask |= GCBackground; |
694 } | 694 } |
695 | 695 |
696 if (IMAGE_INSTANCEP (bg_pmap) | 696 /* This special case comes from a request to draw text with a face which has |
697 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) | 697 the dim property. We'll use a stippled foreground GC. */ |
698 if (EQ (bg_pmap, Qdim)) | |
699 { | |
700 assert (DEVICE_X_GRAY_PIXMAP (d) != None); | |
701 | |
702 gcv.fill_style = FillStippled; | |
703 gcv.stipple = DEVICE_X_GRAY_PIXMAP (d); | |
704 mask |= (GCFillStyle | GCStipple); | |
705 } | |
706 else if (IMAGE_INSTANCEP (bg_pmap) | |
707 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) | |
698 { | 708 { |
699 if (XIMAGE_INSTANCE_PIXMAP_DEPTH (bg_pmap) == 0) | 709 if (XIMAGE_INSTANCE_PIXMAP_DEPTH (bg_pmap) == 0) |
700 { | 710 { |
701 gcv.fill_style = FillOpaqueStippled; | 711 gcv.fill_style = FillOpaqueStippled; |
702 gcv.stipple = XIMAGE_INSTANCE_X_PIXMAP (bg_pmap); | 712 gcv.stipple = XIMAGE_INSTANCE_X_PIXMAP (bg_pmap); |
913 } | 923 } |
914 | 924 |
915 if (cursor && cursor_cachel && focus && NILP (bar_cursor_value)) | 925 if (cursor && cursor_cachel && focus && NILP (bar_cursor_value)) |
916 gc = x_get_gc (d, font, cursor_cachel->foreground, | 926 gc = x_get_gc (d, font, cursor_cachel->foreground, |
917 cursor_cachel->background, Qnil, Qnil); | 927 cursor_cachel->background, Qnil, Qnil); |
928 else if (cachel->dim) | |
929 { | |
930 /* Ensure the gray bitmap exists */ | |
931 if (DEVICE_X_GRAY_PIXMAP (d) == None) | |
932 DEVICE_X_GRAY_PIXMAP (d) = | |
933 XCreateBitmapFromData (dpy, x_win, (char *)gray_bits, | |
934 gray_width, gray_height); | |
935 | |
936 /* Request a GC with the gray stipple pixmap to draw dimmed text */ | |
937 gc = x_get_gc (d, font, cachel->foreground, cachel->background, | |
938 Qdim, Qnil); | |
939 } | |
918 else | 940 else |
919 gc = x_get_gc (d, font, cachel->foreground, cachel->background, | 941 gc = x_get_gc (d, font, cachel->foreground, cachel->background, |
920 Qnil, Qnil); | 942 Qnil, Qnil); |
921 | 943 |
922 if (need_clipping) | 944 if (need_clipping) |