From 08aa97a16435e4569975d203c7e1f3050b207d8a Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 5 Oct 2012 17:40:55 +0200 Subject: [PATCH] Redo coordinate / piece-count printing ith cairo --- xboard.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/xboard.c b/xboard.c index 6d8f18c..c5c849b 100644 --- a/xboard.c +++ b/xboard.c @@ -2858,6 +2858,22 @@ DrawOneSquare (int x, int y, ChessSquare piece, int square_color, int marker, ch if (appData.monoMode) { XDrawImageString(xDisplay, xBoardWindow, hGC, xx, yy, string, 1); } else { + if(*appData.pngDirectory) { + cairo_t *cr = cairo_create (csBoardWindow); + cairo_select_font_face (cr, "Sans", + CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_BOLD); + + cairo_set_font_size (cr, squareSize/4); + + cairo_move_to (cr, xx-1, yy); + 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); + + /* free memory */ + cairo_destroy (cr); + } else XDrawString(xDisplay, xBoardWindow, hGC, xx, yy, string, 1); } } -- 1.7.0.4