From 3affbc3c3c0ea90b2a0bba6f5ae407500994b8ba Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 20 Aug 2016 23:57:56 -0300 Subject: [PATCH] eeshow/gui/over.c, over.h: make coordinates "int" (to avoid bad surprises) --- eeshow/gui/over.c | 9 ++++----- eeshow/gui/over.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eeshow/gui/over.c b/eeshow/gui/over.c index 3c54149..d58e6d7 100644 --- a/eeshow/gui/over.c +++ b/eeshow/gui/over.c @@ -71,7 +71,7 @@ static void rrect(cairo_t *cr, double x, double y, double w, double h, int r) static void background(const struct overlay *over, cairo_t *cr, - unsigned x, unsigned y, unsigned w, unsigned h) + int x, int y, unsigned w, unsigned h) { const struct overlay_style *style = &over->style; const struct color *bg = &style->bg; @@ -90,8 +90,7 @@ static void background(const struct overlay *over, cairo_t *cr, } -static void post_aoi(struct overlay *over, - unsigned x, unsigned y, unsigned w, unsigned h) +static void post_aoi(struct overlay *over, int x, int y, unsigned w, unsigned h) { struct aoi aoi_cfg = { .x = x, @@ -120,7 +119,7 @@ static void post_aoi(struct overlay *over, static unsigned overlay_draw(struct overlay *over, cairo_t *cr, - unsigned x, unsigned y, int dx, int dy) + int x, int y, int dx, int dy) { const struct overlay_style *style = &over->style; const struct color *fg = &style->fg; @@ -204,7 +203,7 @@ fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over-> void overlay_draw_all_d(struct overlay *overlays, cairo_t *cr, - unsigned x, unsigned y, int dx, int dy) + int x, int y, int dx, int dy) { struct overlay *over = overlays; unsigned h; diff --git a/eeshow/gui/over.h b/eeshow/gui/over.h index 3ead498..58a4e7d 100644 --- a/eeshow/gui/over.h +++ b/eeshow/gui/over.h @@ -45,7 +45,7 @@ struct overlay; void overlay_draw_all_d(struct overlay *overlays, cairo_t *cr, - unsigned x, unsigned y, int dx, int dy); + int x, int y, int dx, int dy); void overlay_draw_all(struct overlay *overlays, cairo_t *cr, int x, int y); void overlay_size(const struct overlay *over, PangoContext *pango_context,