repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: c901870f5ab80e369865d0a57759e1836d571c96: path_to: revision_to:
commit c901870f5ab80e369865d0a57759e1836d571c96 Author: Marc LehmannDate: Thu Nov 2 17:23:50 2006 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes
+++ b/Changes
@@ -20,7 +20,6 @@ WISH: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the
WISH: kick out xpm.C, replace by pixbuf
DUMB: support tex fonts
-TODO: clear_rect -1 transparency breaks -ip
8.0
- combining characters cleared the area instead of creating an overlay,
thus losing the ability to draw combining characters properly in most
diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -522,6 +522,8 @@ enum {
*/
enum colour_list {
+ Color_none = -2,
+ Color_transparent = -1,
Color_fg = 0,
Color_bg,
minCOLOR, /* 2 */
diff --git a/src/rxvtfont.C b/src/rxvtfont.C
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -234,7 +234,7 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color)
dTermDisplay;
dTermGC;
- if (color == Color_bg)
+ if (color == Color_bg || color == Color_transparent)
XClearArea (disp, d, x, y, w, h, false);
else if (color >= 0)
{
@@ -443,7 +443,7 @@ rxvt_font_default::draw (rxvt_drawable &d, int x, int y,
? f1
: (*fs)[fs->find_font (cc->c2)];
- f2->draw (d, x, y, chrs, width, fg, -1);
+ f2->draw (d, x, y, chrs, width, fg, Color_none);
}
}
#endif
diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C
+++ b/src/screen.C
@@ -2351,14 +2351,14 @@ rxvt_term::scr_refresh () NOTHROW
*/
rxvt_font *font = (*fontset[GET_STYLE (rend)])[GET_FONT (rend)];
- if (back == Color_bg && have_bg)
+ if (have_bg && back == Color_bg)
{
// this is very ugly, maybe push it into ->draw?
for (i = 0; i < count; i++) /* don't draw empty strings */
if (text[i] != ' ')
{
- font->draw (*drawable, xpixel, ypixel, text, count, fore, -1);
+ font->draw (*drawable, xpixel, ypixel, text, count, fore, Color_transparent);
goto did_clear;
}
-----END OF PAGE-----