From: H.G. Muller Date: Mon, 17 Mar 2014 22:05:33 +0000 (+0100) Subject: Render inscriptions on Chu-promoted pieces in red X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=fcdae93cdc0700e2680e15aaecdaf1eefa8940cd;p=xboard.git Render inscriptions on Chu-promoted pieces in red --- diff --git a/draw.c b/draw.c index 080fd82..12b8b65 100644 --- a/draw.c +++ b/draw.c @@ -727,6 +727,7 @@ DrawText (char *string, int x, int y, int align) } cairo_move_to (cr, xx-1, yy); + if(align == -2) cairo_set_source_rgb (cr, 1.0, 0.0, 0.0); else if(align < 3) cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); else cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_show_text (cr, string); @@ -755,7 +756,7 @@ InscribeKanji (ChessSquare piece, int x, int y) strncpy(buf, p, 10); for(q=buf; (*++q & 0xC0) == 0x80;); *q = NULLCHAR; - DrawText(buf, x, y, -1); + DrawText(buf, x, y, n > WhiteLion ? -2 : -1); } void