From c64bb96345d0464fe123b5e1af71eb3f0f1afc3c Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 3 Oct 2012 14:45:07 +0200 Subject: [PATCH] Redo marker dots with cairo --- xboard.c | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/xboard.c b/xboard.c index 97cc06d..99af048 100644 --- a/xboard.c +++ b/xboard.c @@ -2659,14 +2659,22 @@ ChooseDrawFunc () void DrawDot (int marker, int x, int y, int r) { + cairo_t *cr; + DrawSeekOpen(); + cr = cairo_create(cs); + cairo_arc(cr, x+r/2, y+r/2, r/2, 0.0, 2*M_PI); if(appData.monoMode) { - XFillArc(xDisplay, xBoardWindow, marker == 2 ? darkSquareGC : lightSquareGC, - x, y, r, r, 0, 64*360); - XDrawArc(xDisplay, xBoardWindow, marker == 2 ? lightSquareGC : darkSquareGC, - x, y, r, r, 0, 64*360); - } else - XFillArc(xDisplay, xBoardWindow, marker == 2 ? prelineGC : highlineGC, - x, y, r, r, 0, 64*360); + SetPen(cr, 2, marker == 2 ? "#000000" : "#FFFFFF", 0); + cairo_stroke_preserve(cr); + SetPen(cr, 2, marker == 2 ? "#FFFFFF" : "#000000", 0); + } else { + SetPen(cr, 2, marker == 2 ? "#FF0000" : "#FFFF00", 0); + } + cairo_fill(cr); + cairo_stroke(cr); + + cairo_destroy(cr); + DrawSeekClose(); } void -- 1.7.0.4