summaryrefslogtreecommitdiff
path: root/gui/render.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-29 22:14:48 -0300
committerWerner Almesberger <werner@almesberger.net>2016-09-29 22:22:03 -0300
commitafc999c766661b50d9f3070864a3d9c3c2c9c500 (patch)
tree29e432f640b967773d3a69e3b34c61e63bf6c77c /gui/render.c
parent9fa6e29c6bbd1cb2f1c3b988267c12522baae08a (diff)
downloadeeshow-afc999c766661b50d9f3070864a3d9c3c2c9c500.tar.gz
eeshow-afc999c766661b50d9f3070864a3d9c3c2c9c500.tar.bz2
eeshow-afc999c766661b50d9f3070864a3d9c3c2c9c500.zip
gui/common.h (show_extra): change from bool to enum gfx_extra (mask)
Diffstat (limited to 'gui/render.c')
-rw-r--r--gui/render.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gui/render.c b/gui/render.c
index a6289a4..a70fbf6 100644
--- a/gui/render.c
+++ b/gui/render.c
@@ -40,7 +40,7 @@
bool use_delta = 0;
-bool show_extra = 0;
+enum gfx_extra show_extra = 0;
/* ----- Helper functions -------------------------------------------------- */
@@ -159,8 +159,7 @@ static void hack(const struct gui *gui, cairo_t *cr,
areas = changed_sheets(gui, xo, yo, f);
diff_to_canvas(cr, gui->x, gui->y, gui->scale,
- gfx_user(old->gfx), gfx_user(new->gfx),
- show_extra ? gfx_pin_type : 0, areas);
+ gfx_user(old->gfx), gfx_user(new->gfx), show_extra, areas);
free_areas(&areas);
}
@@ -173,7 +172,6 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
GtkAllocation alloc;
float f = gui->scale;
int x, y;
- enum gfx_extra extra = show_extra ? gfx_pin_type : 0;
gtk_widget_get_allocation(gui->da, &alloc);
x = -(sheet->xmin + gui->x) * f + alloc.width / 2;
@@ -182,12 +180,12 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
cro_canvas_prepare(cr);
if (!gui->old_hist || gui->diff_mode == diff_new) {
highlight_glabel(gui, sheet, cr, x, y, f);
- cro_canvas_draw(gfx_user(sheet->gfx), cr, x, y, f, extra);
+ cro_canvas_draw(gfx_user(sheet->gfx), cr, x, y, f, show_extra);
} else if (gui->diff_mode == diff_old) {
sheet = find_corresponding_sheet(gui->old_hist->sheets,
gui->new_hist->sheets, gui->curr_sheet);
highlight_glabel(gui, sheet, cr, x, y, f);
- cro_canvas_draw(gfx_user(sheet->gfx), cr, x, y, f, extra);
+ cro_canvas_draw(gfx_user(sheet->gfx), cr, x, y, f, show_extra);
} else if (use_delta) {
struct area *areas = changed_sheets(gui, x, y, f);
const struct area *area;
@@ -202,9 +200,11 @@ static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
/* @@@ fix geometry later */
cro_canvas_draw(gfx_user(gui->delta_ab.gfx), cr, x, y, f,
- extra);
- cro_canvas_draw(gfx_user(gui->delta_a.gfx), cr, x, y, f, extra);
- cro_canvas_draw(gfx_user(gui->delta_b.gfx), cr, x, y, f, extra);
+ show_extra);
+ cro_canvas_draw(gfx_user(gui->delta_a.gfx), cr, x, y, f,
+ show_extra);
+ cro_canvas_draw(gfx_user(gui->delta_b.gfx), cr, x, y, f,
+ show_extra);
} else {
hack(gui, cr, x, y, f);
}