From 8c7f15fe02d40c4a24b3b852276cc49c4995a324 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 8 May 2023 01:23:37 +0300 Subject: [PATCH 47/47] gtk3: Fix canvas.c build See osdn #47991 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/canvas.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/client/gui-gtk-3.0/canvas.c b/client/gui-gtk-3.0/canvas.c index 5cc4b2b5f0..646f02a273 100644 --- a/client/gui-gtk-3.0/canvas.c +++ b/client/gui-gtk-3.0/canvas.c @@ -221,9 +221,9 @@ void canvas_fill_sprite_area(struct canvas *pcanvas, any canvas zoom. ****************************************************************************/ void canvas_put_line(struct canvas *pcanvas, - struct color *pcolor, - enum line_type ltype, int start_x, int start_y, - int dx, int dy) + struct color *pcolor, + enum line_type ltype, int start_x, int start_y, + int dx, int dy) { cairo_t *cr; double dashes[2] = {4.0, 4.0}; @@ -252,6 +252,11 @@ void canvas_put_line(struct canvas *pcanvas, case LINE_GOTO: cairo_set_line_width(cr, 2.); break; + case LINE_SELECT_RECT: + cairo_set_line_width(cr, 2.); + cairo_set_dash(cr, dashes, 2, 0); + cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE); + break; } gdk_cairo_set_source_rgba(cr, &pcolor->color); @@ -304,6 +309,11 @@ void canvas_put_curved_line(struct canvas *pcanvas, case LINE_GOTO: cairo_set_line_width(cr, 2.); break; + case LINE_SELECT_RECT: + cairo_set_line_width(cr, 2.); + cairo_set_dash(cr, dashes, 2, 0); + cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE); + break; } gdk_cairo_set_source_rgba(cr, &pcolor->color); -- 2.39.2