From 750012943aaf86c529bcf93b39dbbd7523e80d55 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 31 Mar 2012 17:57:55 +0200 Subject: roi: No need to have a cairo_rectangle_t in do_roi --- roi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/roi.c b/roi.c index 4c07a96..1c69240 100644 --- a/roi.c +++ b/roi.c @@ -109,14 +109,13 @@ static gboolean do_roi(struct roi *roi) { GdkPixbuf *match; - cairo_rectangle_t area; + double x, y, width, height; - calc_rubberband_rect(roi, &area.x, &area.y, &area.width, &area.height); - if (area.width < 1 || area.height < 1) + calc_rubberband_rect(roi, &x, &y, &width, &height); + if (width < 1 || height < 1) return FALSE; - match = gdk_pixbuf_new_subpixbuf(roi->input, area.x, area.y, - area.width, area.height); + match = gdk_pixbuf_new_subpixbuf(roi->input, x, y, width, height); calc_roi_interval(roi, match); g_object_unref(match); -- cgit