#include "childio.h"
#include "xgamelist.h"
#include "xhistory.h"
+#include "xevalgraph.h"
#include "xedittags.h"
#include "menus.h"
#include "board.h"
TimeDelay(msec);
}
+static cairo_surface_t *cs; // to keep out of back-end :-(
+
void
DrawBorder (int x, int y, int type)
{
- GC gc = lineGC;
+ cairo_t *cr;
+ DrawSeekOpen();
- if(type == 1) gc = highlineGC; else if(type == 2) gc = prelineGC;
+ cr = cairo_create(cs);
+ cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
+ cairo_rectangle(cr, x, y, squareSize+lineGap, squareSize+lineGap);
+ SetPen(cr, lineGap, type == 1 ? appData.highlightSquareColor : appData.premoveHighlightColor, 0);
+ cairo_stroke(cr);
- XDrawRectangle(xDisplay, xBoardWindow, gc, x, y,
- squareSize+lineGap, squareSize+lineGap);
+ DrawSeekClose();
}
static int
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
// [HGM] seekgraph: some low-level drawing routines (by JC, mostly)
-static cairo_surface_t *cs; // to keep out of back-end :-(
-
float
Color (char *col, int n)
{